1.问题:File “F:\Program Files\Python\Python36\lib\random.py”, line 275, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: ‘range’ object does not support item assignment
解决方法:在data_proccesing.py中第22行改成video_indices=[i for i in range(len(lines))]
,也可以用list,video_indices=list(len(lines))
2.问题:c3d-tensorflow运行convert_images_to_list.sh提示jot:未找到命令
解决方案:安装jot包 (windows无法安装,只能用ubuntu)
sudo apt install athena-jot
3.问题:os.mkdir()时出现FileNotFoundError: [WinError 3] 系统找不到指定的路径
解决方法:将代码改为os.makedirs()即可
4.问题:FileNotFoundError: [WinError 3] 系统找不到指定的路径
解决方案:由于创建时间文件出错,修改时间代码的格式。在train.py
中9行左右,改为TRAIN_LOG_DIR = os.path.join('Log/train/', str(time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime(time.time()))))
,就是把时间的冒号改了。
5.问题:训练自己数据集无法导成图
解决方案:出了命名正确外,每个视频大小不能超过500k。
6.问题:MemoryError: Unable to allocate 4.59 MiB for an array with shape (16, 112, 1…
或者这个提示RuntimeError: CUDA out of memory. Tried to allocate 58.00 MiB (GPU 0; 6.00 GiB total capacity; 3.97 GiB already allocated; 12.14 MiB free; 4.59 GiB reserved in total by PyTorch)
解决方案:改小训练参数,不行就换好一点的电脑。3D卷积训练很吃配置。