Skip to content

name 'model' is not defined #10

@Chauncey-Wang

Description

@Chauncey-Wang

When I use your DeepConvLSTM_py3.py, I get this error.

Traceback (most recent call last):
File "/mnt/ba3b04da-ce1b-4c21-ad1b-3aff7d337cdf/wangxing/convlstm/DeepConvLSTM_py3.py", line 394, in
train(net,X_train,y_train,X_val,y_val,**args)
File "/mnt/ba3b04da-ce1b-4c21-ad1b-3aff7d337cdf/wangxing/convlstm/DeepConvLSTM_py3.py", line 180, in train
output, h = net(inputs,h,inputs.size()[0]) # Run inputs through network
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/mnt/ba3b04da-ce1b-4c21-ad1b-3aff7d337cdf/wangxing/convlstm/DeepConvLSTM_py3.py", line 86, in forward
if model.n_layers > 0:
NameError: name 'model' is not defined

It seems like you do not define 'model' before use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions