fix: gpu memory leaks
This commit is contained in:
parent
3a47920186
commit
593611cdb7
13 changed files with 420 additions and 166 deletions
|
|
@ -117,9 +117,10 @@ class ModelController:
|
|||
"""
|
||||
try:
|
||||
metadata = self.model_repository.get_metadata(self.model_id)
|
||||
# Get first input tensor shape
|
||||
first_input = list(metadata.inputs.values())[0]
|
||||
batch_dim = first_input["shape"][0]
|
||||
# Get first input tensor shape (ModelMetadata has input_shapes, not inputs)
|
||||
first_input_name = metadata.input_names[0]
|
||||
input_shape = metadata.input_shapes[first_input_name]
|
||||
batch_dim = input_shape[0]
|
||||
|
||||
# batch_dim can be -1 (dynamic), 1 (fixed), or N (fixed batch size)
|
||||
if batch_dim == -1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue