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
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
#276
Open
shizishen opened this issue
Feb 28, 2023
· 2 comments
shizishen
changed the title
run train at epoch 1 Traceback (most recent call last): File "main.py", line 152, in <module> train_logger, train_batch_logger) File "/media/lisaiwei/data/working_2023_2_27/Efficient-3DCNNs-master/train.py", line 34, in train_epoch prec1, prec5 = calculate_accuracy(outputs.data, targets.data, topk=(1,5)) File "/media/lisaiwei/data/working_2023_2_27/Efficient-3DCNNs-master/utils.py", line 67, in calculate_accuracy correct_k = correct[:k].view(-1).float().sum(0) RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
Feb 28, 2023
when i run ucf101 by this commond
python main.py --root_path /media/lisaiwei/data/working_2023_2_27/Efficient-3DCNNs-master --video_path datasets/UCF101_JPG --annotation_path annotation_ucf101_self/ucf101_01.json --result_path results --dataset ucf101 --model_depth 50 --n_classes 101 --batch_size 8 --n_threads 4 --checkpoint 1
there is an error
run
train at epoch 1
Traceback (most recent call last):
File "main.py", line 152, in
train_logger, train_batch_logger)
File "/media/lisaiwei/data/working_2023_2_27/Efficient-3DCNNs-master/train.py", line 34, in train_epoch
prec1, prec5 = calculate_accuracy(outputs.data, targets.data, topk=(1,5))
File "/media/lisaiwei/data/working_2023_2_27/Efficient-3DCNNs-master/utils.py", line 67, in calculate_accuracy
correct_k = correct[:k].view(-1).float().sum(0)
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
No description provided.
The text was updated successfully, but these errors were encountered: