Remove `input_size` parameter
See original GitHub issueI tried running the current demo: https://github.com/zalandoresearch/pytorch-ts/blob/62a18cfd0f19fc2247fc7e79e77f44b8dab6c4c9/README.md
But I got
$ ./pts-demo.py
/home/user/.local/lib/python3.10/site-packages/gluonts/json.py:101: UserWarning: Using `json`-module for json-handling. Consider installing one of `orjson`, `ujson` to speed up serialization and deserialization.
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
(pts-demo.py:215019): dbind-WARNING **: 21:15:46.081: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
0%| | 0/49 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/user/src/covid-ts/./pts-demo.py", line 36, in <module>
predictor = estimator.train(training_data=training_data, num_workers=4)
File "/home/user/src/pytorch-ts/pts/model/estimator.py", line 179, in train
return self.train_model(
File "/home/user/src/pytorch-ts/pts/model/estimator.py", line 151, in train_model
self.trainer(
File "/home/user/src/pytorch-ts/pts/trainer.py", line 67, in __call__
output = net(*inputs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/src/pytorch-ts/pts/model/deepar/deepar_network.py", line 246, in forward
distr = self.distribution(
File "/home/user/src/pytorch-ts/pts/model/deepar/deepar_network.py", line 221, in distribution
rnn_outputs, _, scale, _ = self.unroll_encoder(
File "/home/user/src/pytorch-ts/pts/model/deepar/deepar_network.py", line 200, in unroll_encoder
outputs, state = self.rnn(inputs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/rnn.py", line 767, in forward
self.check_forward_args(input, hx, batch_sizes)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/rnn.py", line 692, in check_forward_args
self.check_input(input, batch_sizes)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/rnn.py", line 205, in check_input
raise RuntimeError(
RuntimeError: input.size(-1) must be equal to input_size. Expected 43, got 19
I tried to trace the code a bit but I got lost. I know 43 comes from https://github.com/zalandoresearch/pytorch-ts/blob/62a18cfd0f19fc2247fc7e79e77f44b8dab6c4c9/README.md?plain=1#L63 but I don’t understand where the 19 is coming from.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
MATLAB removeParameter - MathWorks
This MATLAB function removes the parameter specified by name from the ONNXParameters object params.
Read more >How to delete the parameter of a Neural Network?
The weights in the neural network are stored in the form of RawArray . This can be seen by comparing their full form...
Read more >How to remove an input param and pass remaining from ...
Hi ,. I have an input parameter called abc which i want to remove (both key and value)from preprocessor so that it should...
Read more >Invalid argument: Input size should match but they differ by 2 ...
Remove /replace any files you find and it should train normally. import glob img_paths = glob.glob(os.path.join(<path_to_dataset>,'*/*.
Read more >A guide to an efficient way to build neural network ...
Parameters for the padding function in Keras are Same- output size is the same as input size by padding evenly left and right, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I simply set
input_size=19
and everything seems to work, and the predictions seem reasonable.some sample outputs
I don’t really understand from your docs what
input_size
is supposed to do. It doesn’t seem to be related to the shape of the demo’s input data, which is (15831, 1).I saw you updated the readme in the meantime! Thanks a lot for that, @kashif 😃