ASG
ASG copied to clipboard
TypeError: argument of type 'Tensor' is not iterable
Hi @eyounx ,
I get the following error when I run main.py:
`C:\Users\RAR7ABT\AppData\Local\conda\conda\envs\test\python.exe C:/Users/RAR7ABT/pj-val-ml/pjval_ml/OSR/ASG/run.py
Could not import RBDataSequenceDataset
Traceback (most recent call last):
File "C:/Users/RAR7ABT/pj-val-ml/pjval_ml/OSR/ASG/run.py", line 56, in
Process finished with exit code 1
` It might be a version compatibility issue. Any help would be appreciated. Thank you!
In this case, the tensor vector cannot be recognized by the python iterator. You can try to convert 'idx_label' to list or numpy array types. I hope this will help you.
Converting the tensor to list or array did not help. Did you face this issue as well?
Converting the tensor to list or array did not help. Did you face this issue as well?
Not quite sure what caused the issue. Could you run the demo file correctly?
I initially got this error:
Start filter data by category!
File "C:/Users/RAR7ABT/pj-val-ml/pjval_ml/OSR/ASG/run.py", line 72, in
Then I changed " if data_by_label.has_key(idx_label): data_by_label[idx_label].append(idx_data)" to " if data_by_label in idx_label: data_by_label[idx_label.item()].append(idx_data)"
So now I end up with "TypeError: argument of type 'numpy.int64' is not iterable"