Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Setting --batch_size to 8 results in RuntimeError #7

Open
wagpa opened this issue Jan 5, 2022 · 1 comment
Open

Setting --batch_size to 8 results in RuntimeError #7

wagpa opened this issue Jan 5, 2022 · 1 comment

Comments

@wagpa
Copy link

wagpa commented Jan 5, 2022

Hi, when I run the (slightly altered) script from the README

time ./experiments/davis/train_sequence.sh 0 --track_id dog --batch_size 8

i get a RuntimeError: number of dims don't match in permute.

Output & Stacktrace:

...
[Verbose] # training points: 274
[Verbose] # training batches per epoch: 34
[Verbose] # test batches: 7
==> Training
Epoch 1/20
Traceback (most recent call last):
  File "/home/hydrofin/dynamic-video-depth/train.py", line 364, in <module>
    main()
  File "/home/hydrofin/dynamic-video-depth/train.py", line 114, in main
    main_worker(None, 1, opt=opt)
  File "/home/hydrofin/dynamic-video-depth/train.py", line 339, in main_worker
    model.train_epoch(
  File "/home/hydrofin/dynamic-video-depth/models/netinterface.py", line 354, in train_epoch
    _train(epoch)
  File "/home/hydrofin/dynamic-video-depth/models/netinterface.py", line 295, in _train
    batch_log = self._train_on_batch(epoch, i, data)
  File "/home/hydrofin/dynamic-video-depth/models/scene_flow_motion_field.py", line 187, in _train_on_batch
    pred = self._predict_on_batch()
  File "/home/hydrofin/dynamic-video-depth/models/scene_flow_motion_field.py", line 233, in _predict_on_batch
    depth_1 = self.net_depth(self._input.img_1)
  File "/home/hydrofin/anaconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/hydrofin/dynamic-video-depth/third_party/MiDaS.py", line 216, in forward
    x = x.permute([0, 2, 3, 1])
RuntimeError: number of dims don't match in permute

Specs:

  • WSL 2: 5.10.60.1-microsoft-standard-WSL2
  • using Anaconda: conda 4.11.0
  • on Windows 10
  • GPU (8 GiB): NVIDIA GeForce RTX 2060 SUPER

Note:
I can't run the scripts as is, because the default batch size (of 16?) results in a out-of-memory on my 8 GiB GPU.
Also, when running the script, i had to manually install some libs (like pandas). I don't know, if i did something wrong or if the script has an error.

@semel1
Copy link

semel1 commented Feb 3, 2022

Any details about "...slightly altered script from the README" and "install some libs (like pandas)"?
In my case upon run
bash ./experiments/davis/train_sequence.sh 0 --track_id dog
I've got:
SyntaxError: invalid syntax

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

No branches or pull requests

2 participants