Update utils/actor_utils.py
Browse files- utils/actor_utils.py +1 -1
utils/actor_utils.py
CHANGED
@@ -54,7 +54,7 @@ def select_data(actor, index, include_embeddings=True, include_projections=True)
|
|
54 |
|
55 |
def select_attributes(obj):
|
56 |
for name, value in obj.__dict__.items():
|
57 |
-
if isinstance(value, torch.Tensor) and value.size(0) >= index.max().item():
|
58 |
setattr(obj, name, value[index])
|
59 |
|
60 |
select_attributes(actor.fleet)
|
|
|
54 |
|
55 |
def select_attributes(obj):
|
56 |
for name, value in obj.__dict__.items():
|
57 |
+
if isinstance(value, torch.Tensor) and value.dim() > 0 and value.size(0) >= index.max().item():
|
58 |
setattr(obj, name, value[index])
|
59 |
|
60 |
select_attributes(actor.fleet)
|