You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I followed the steps you gave to run the code, but an error was reported in line 632(feat_fc_video_source = feat_fc_source.view((-1, num_segments) + feat_fc_source.size()[-1:])) of the models.py file.
the error as follows: Traceback (most recent call last): File "/data/lizhijia/python_project/TA3N-master/main.py", line 835, in <module> main() File "/data/lizhijia/python_project/TA3N-master/main.py", line 252, in main prec1 = validate(val_loader, model, criterion, num_class, epoch, val_file) File "/data/lizhijia/python_project/TA3N-master/main.py", line 707, in validate _, _, _, _, _, attn_val, out_val, out_val_2, pred_domain_val, feat_val = model(val_data, val_data, [0]*len(args.beta), 0, is_train=False, reverse=False) File "/home/lizhijia/anaconda3/envs/Hyrsm++/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/lizhijia/anaconda3/envs/Hyrsm++/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 165, in forward return self.module(*inputs[0], **kwargs[0]) File "/home/lizhijia/anaconda3/envs/Hyrsm++/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/data/lizhijia/python_project/TA3N-master/models.py", line 632, in forward feat_fc_video_source = feat_fc_source.view((-1, num_segments) + feat_fc_source.size()[-1:]) # reshape based on the segments (e.g. 640x512 --> 128x5x512) RuntimeError: only one dimension can be inferred
The text was updated successfully, but these errors were encountered:
I noticed that when training to train[1][0/1], the parameters in the viem method became (-1,-1,512), so I fixed the parameters in the view method directly to (-1,5,512), and then the code can run. But the training result is: Best score 33.33333206176758 vs current score 12.962963104248047
Is this result correct?
one more question: You divide the dataset into a validation set and a training set. When I test the model, should I use the validation set of the target domain?
Hi, I followed the steps you gave to run the code, but an error was reported in line 632(feat_fc_video_source = feat_fc_source.view((-1, num_segments) + feat_fc_source.size()[-1:])) of the models.py file.
the error as follows:
Traceback (most recent call last): File "/data/lizhijia/python_project/TA3N-master/main.py", line 835, in <module> main() File "/data/lizhijia/python_project/TA3N-master/main.py", line 252, in main prec1 = validate(val_loader, model, criterion, num_class, epoch, val_file) File "/data/lizhijia/python_project/TA3N-master/main.py", line 707, in validate _, _, _, _, _, attn_val, out_val, out_val_2, pred_domain_val, feat_val = model(val_data, val_data, [0]*len(args.beta), 0, is_train=False, reverse=False) File "/home/lizhijia/anaconda3/envs/Hyrsm++/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/lizhijia/anaconda3/envs/Hyrsm++/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 165, in forward return self.module(*inputs[0], **kwargs[0]) File "/home/lizhijia/anaconda3/envs/Hyrsm++/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/data/lizhijia/python_project/TA3N-master/models.py", line 632, in forward feat_fc_video_source = feat_fc_source.view((-1, num_segments) + feat_fc_source.size()[-1:]) # reshape based on the segments (e.g. 640x512 --> 128x5x512) RuntimeError: only one dimension can be inferred
The text was updated successfully, but these errors were encountered: