PyCharm Code Inspect fixes (#18392)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
d35860d4a1
commit
e5e91967d9
31 changed files with 72 additions and 72 deletions
|
|
@ -813,7 +813,7 @@ class Exporter:
|
|||
workspace = int(self.args.workspace * (1 << 30)) if self.args.workspace is not None else 0
|
||||
if is_trt10 and workspace > 0:
|
||||
config.set_memory_pool_limit(trt.MemoryPoolType.WORKSPACE, workspace)
|
||||
elif workspace > 0 and not is_trt10: # TensorRT versions 7, 8
|
||||
elif workspace > 0: # TensorRT versions 7, 8
|
||||
config.max_workspace_size = workspace
|
||||
flag = 1 << int(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)
|
||||
network = builder.create_network(flag)
|
||||
|
|
|
|||
|
|
@ -1170,6 +1170,4 @@ class Model(nn.Module):
|
|||
>>> print(model.stride)
|
||||
>>> print(model.task)
|
||||
"""
|
||||
if name == "model":
|
||||
return self._modules["model"]
|
||||
return getattr(self.model, name)
|
||||
return self._modules["model"] if name == "model" else getattr(self.model, name)
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ class BaseValidator:
|
|||
|
||||
cost_matrix = iou * (iou >= threshold)
|
||||
if cost_matrix.any():
|
||||
labels_idx, detections_idx = scipy.optimize.linear_sum_assignment(cost_matrix, maximize=True)
|
||||
labels_idx, detections_idx = scipy.optimize.linear_sum_assignment(cost_matrix)
|
||||
valid = cost_matrix[labels_idx, detections_idx] > 0
|
||||
if valid.any():
|
||||
correct[detections_idx[valid], i] = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue