MS_LSTM icon indicating copy to clipboard operation
MS_LSTM copied to clipboard

I want to test your code, but something went wrong in train.py

Open nightsky37 opened this issue 4 years ago • 5 comments

Traceback (most recent call last):
  File "train.py", line 27, in <module>
    w = open('./logs/merge_tes_40attn.log', 'w')
FileNotFoundError: [Errno 2] No such file or directory: './logs/merge_tes_40attn.log'

It seems no file named "logs". Could you provide it? Thank you.

nightsky37 avatar Dec 27 '21 09:12 nightsky37

You can simply create a 'logs' directory. I think this will work.

chmxu avatar Feb 16 '22 05:02 chmxu

when I run train.py i got this error:

ModuleNotFoundError: No module named 'torch.nn._functions'

and i didn't find this module in pytorch's ducument

xiaolongtuan-yuan avatar Sep 29 '22 13:09 xiaolongtuan-yuan

when I run train.py i got this error:

ModuleNotFoundError: No module named 'torch.nn._functions'

and i didn't find this module in pytorch's ducument

Hi, can you provide an error log? I guess there is something wrong with your installation of pytorch or the version of that.

chmxu avatar Sep 30 '22 01:09 chmxu

when I run train.py i got this error: ModuleNotFoundError: No module named 'torch.nn._functions' and i didn't find this module in pytorch's ducument

Hi, can you provide an error log? I guess there is something wrong with your installation of pytorch or the version of that.

Traceback (most recent call last): File "train.py", line 2, in from model import Scoring File "/content/drive/MyDrive/MS_LSTM/model.py", line 7, in from util.graph_definition import * File "/content/drive/MyDrive/MS_LSTM/util/graph_definition.py", line 13, in from rnn_cells.base_rnn import custom_LSTM File "/content/drive/MyDrive/MS_LSTM/rnn_cells/base_rnn.py", line 8, in from rnn_cells.functions_rnn import custom_RNN as backend_custom_RNN File "/content/drive/MyDrive/MS_LSTM/rnn_cells/functions_rnn.py", line 4, in from torch.nn._functions.rnn import LSTMCell, GRUCell ModuleNotFoundError: No module named 'torch.nn._functions'

xiaolongtuan-yuan avatar Sep 30 '22 01:09 xiaolongtuan-yuan

I have checked that pytorch 0.4.0 has this module but the latest version has changed that. I think changing your version to 0.4.0/updating the code according to your version (e.g. find the corresponding LSTMCell module in the latest version) can work this problem out.

chmxu avatar Sep 30 '22 06:09 chmxu