作者您好,您能告诉我SGCN模型的运行环境吗?我复现该模型,输入python main.py --train_size 1.0报错为 File "D:\SGCN-main\SGCN\SGCN_MLTC\model.py", line 179, in forward
torch.vstack()
AttributeError: module 'torch' has no attribute 'vstack'这个如何解决?
好的,谢谢您,我放到3090服务器上能运行了。现在有个SGCN_MLTC目录下运行模型报错为Traceback (most recent call last):
File "main.py", line 150, in
show_result=True)
File "/root/autodl-tmp/SGCN-main/SGCN/SGCN_MLTC/train.py", line 72, in train_model
torch.save(model,save_path)
File "/root/miniconda3/envs/py/lib/python3.6/site-packages/torch/serialization.py", line 369, in save
with _open_file_like(f, 'wb') as opened_file:
File "/root/miniconda3/envs/py/lib/python3.6/site-packages/torch/serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/root/miniconda3/envs/py/lib/python3.6/site-packages/torch/serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'model/best_model.pth',我看您的代码中,train.py里创建了train_model方法,里面保存了save_path = 'model/best_model.pth'这个路径,但是运行python main.py --train_size 1.0没有生成该文件。
作者您好,您能告诉我SGCN模型的运行环境吗?我复现该模型,输入python main.py --train_size 1.0报错为 File "D:\SGCN-main\SGCN\SGCN_MLTC\model.py", line 179, in forward torch.vstack() AttributeError: module 'torch' has no attribute 'vstack'这个如何解决?