Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isseu running - does not work on Mac #12

Closed
sada-narayanappa opened this issue Nov 11, 2018 · 2 comments
Closed

Isseu running - does not work on Mac #12

sada-narayanappa opened this issue Nov 11, 2018 · 2 comments

Comments

@sada-narayanappa
Copy link

When I run I get the following error - could you help me how to fixe this
It uses default ecg and

python3 1_train_predictor.py --device cpu --data ecg --filename chfdb_chf13_45590.pkl
=> Start training from scratch

Namespace(augment=True, batch_size=64, bptt=50, clip=10, data='ecg', device='cpu', dropout=0.2, emsize=32, epochs=400, eval_batch_size=64, filename='chfdb_chf13_45590.pkl', log_interval=10, lr=0.0002, model='LSTM', nhid=32, nlayers=2, prediction_window_size=10, pretrained=False, res_connection=False, resume=False, save_fig=False, save_interval=10, seed=1111, teacher_forcing_ratio=0.7, tied=False, weight_decay=0.0001)

Traceback (most recent call last):
File "1_train_predictor.py", line 320, in
train(args,model,train_dataset,epoch)
File "1_train_predictor.py", line 228, in train
loss1 = criterion(outSeq1.view(args.batch_size,-1), targetSeq.view(args.batch_size,-1))
RuntimeError: invalid argument 2: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Call .contiguous() before .view(). at /Users/soumith/code/builder/wheel/pytorch-src/aten/src/TH/generic/THTensor.cpp:237

@chickenbestlover
Copy link
Owner

See #2.

@sada-narayanappa
Copy link
Author

Yeah that works.

There is one more after that, we need "contiguous()" call - having done that it works.
It would be great to update the code with those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants