-
Notifications
You must be signed in to change notification settings - Fork 739
Closed
Description
Following #409, view is used instead of reshape. When running the tutorial, the following error occurs as mentioned here:
Apr 22 18:46:35 Traceback (most recent call last):
Apr 22 18:46:35 File "/opt/conda/lib/python3.6/site-packages/sphinx_gallery/gen_rst.py", line 394, in _memory_usage
Apr 22 18:46:35 out = func()
Apr 22 18:46:35 File "/opt/conda/lib/python3.6/site-packages/sphinx_gallery/gen_rst.py", line 382, in __call__
Apr 22 18:46:35 exec(self.code, self.globals)
Apr 22 18:46:35 File "/var/lib/jenkins/workspace/beginner_source/audio_preprocessing_tutorial.py", line 216, in <module>
Apr 22 18:46:35 computed = torchaudio.functional.compute_deltas(specgram, win_length=3)
Apr 22 18:46:35 File "/opt/conda/lib/python3.6/site-packages/torchaudio/functional.py", line 1304, in compute_deltas
Apr 22 18:46:35 specgram = specgram.view(1, -1, shape[-1])
Apr 22 18:46:35 RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
Workaround:
- add
specgram = specgram.contiguous(), see make tensor contiguous tutorials#963
Proposed solution:
- revert replace reshape by view #409
Metadata
Metadata
Assignees
Labels
No labels