TengdaHan / CoCLR

[NeurIPS'20] Self-supervised Co-Training for Video Representation Learning. Tengda Han, Weidi Xie, Andrew Zisserman.
Apache License 2.0
286 stars 32 forks source link

TypeError: order must be str, not int #49

Closed wys2929 closed 2 years ago

wys2929 commented 2 years ago

when i try CUDA_VISIBLE_DEVICES=0,1 python main_classifier.py --net s3d --dataset ucf101 --seq_len 32 --ds 1 --batch_size 32 --train_what ft --epochs 500 --schedule 400 450 --test CoCLR-ucf101-rgb-128-s3d-ep182.pth --ten_crop out: ... TypeError: Caught TypeError in DataLoader worker process 0. Original Traceback (most recent call last): ... File "../dataset/lmdb_dataset.py", line 182, in getitem frame_index = self.frame_sampler(vlen) File "../dataset/lmdb_dataset.py", line 122, in frame_sampler seq_idx = seq_idx.flatten(0) TypeError: order must be str, not int

TengdaHan commented 2 years ago

Hi, this is a NumPy version issue. In the newer version of NumPy, just replace seq_idx.flatten(0) with seq_idx.flatten()

wys2929 commented 2 years ago

Thank you very much! Your answer solved my problem! Best wishes to you!