Comments (10)
https://github.com/NVIDIA/flownet2-pytorch/tree/python36
from flownet2-pytorch.
I met this error when loading pre-trained weight from python3
Traceback (most recent call last):
File "main.py", line 270, in <module>
main()
File "main.py", line 262, in main
train(EPOCH, model, optimizer, BATCH)
File "main.py", line 176, in train
output = model(data)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line
357, in __call__
result = self.forward(*input, **kwargs)
File "main.py", line 128, in forward
c_out = self.flownetc(c_in)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line
357, in __call__
result = self.forward(*input, **kwargs)
File "/notebooks/data/jacky/VINet/FlowNetC.py", line 106, in forward
concat5 = torch.cat((out_conv5,out_deconv5,flow6_up),1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimensio
n 1. Got 18 and 17 in dimension 2 at /pytorch/torch/lib/THC/generic/THCTensorMat
h.cu:111
from flownet2-pytorch.
I found the solution for the error above. I'm running the whole project inside the docker container.
And this is caused by docker setting.
Docker should be run with --shm-size
command
sudo nvidia-docker run --shm-size 8G .........
Note1
Relative discussion could be found at:
Note2
I start my training successfully by the following command:
python3 main.py --batch_size 8 --model FlowNet2C --optimizer=Adam --optimizer_lr=1e-4 --loss=MultiScale --loss_norm=L1 --loss_numScales=5 --loss_startScale=4 --optimizer_lr=1e-4 --crop_size 384 512 --training_dataset FlyingChairs --training_dataset_root /notebooks/data/FlyingChairs_release/data --validation_dataset MpiSintelClean --validation_dataset_root /notebooks/data/mpi_sintel_dataset/training
from flownet2-pytorch.
Hey @HTLife
For porting it to python3. You have to change few import statements. For example
Instead of from correlation_package.modules.correlation import Correlation
I used
from networks.correlation_package.modules.correlation import Correlation
I am not sure why this happens but in python3 relative paths for import
doesn't work for me.
Hope this helps
from flownet2-pytorch.
@TusharNimbhorkar Thanks for your tips.
Could you load that pre-trained weight by python3 successfully?
from flownet2-pytorch.
@HTLife
Haven't tried it yet. But I am training from the start and inference step seems to be working for that.
from flownet2-pytorch.
Got it! That's another solution. Thanks again.
from flownet2-pytorch.
I’m looking at this.
from flownet2-pytorch.
i've added a python3 branch.
from flownet2-pytorch.
@fitsumreda How many memory(main/GPU) is required to train flownet2-pytorch?
- My main memory size: 32GB
- GPU memory: 11GB
I got this error message when I tried to train the network.
Overall Progress: 0%| | 0/10000 [00:00<?, ?it/s]
ERROR: Unexpected bus error encountered in worker.
This might be caused by insufficient shared memory (shm). | 0/130.0 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 407, in <module>
validation_loss, _ = train(args=args, epoch=epoch - 1, start_iteration=global_iteration, data_loader=validation_loader, model=model_and_loss, optimizer=optimizer, logger=validation_logger, is_validate=True, offset=offset)
File "main.py", line 260, in train
for batch_idx, (data, target) in enumerate(progress):
File "/usr/local/lib/python3.5/dist-packages/tqdm/_tqdm.py", line 910, in __iter__
for obj in iterable:
File "/notebooks/data/flownet2-pytorch/utils/tools.py", line 111, in __next__
n = next(self.iterator)
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 275, in __next__
idx, batch = self._get_batch()
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 254, in _get_batch
return self.data_queue.get()
File "/usr/lib/python3.5/queue.py", line 164, in get
self.not_empty.wait()
File "/usr/lib/python3.5/threading.py", line 293, in wait
waiter.acquire()
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 175, in handler
_error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 1361) is killed by signal: Bus error.
from flownet2-pytorch.
Related Issues (20)
- ValueError (inference) HOT 1
- inference error
- Error when running Inference: forward call is outdated and returns an error when called.
- Flownet2 model for faces HOT 1
- Thanks for this repository! could you please provide the pretrained model for FlowNet2ss or FlowNet2s (lower-case letters, pytorch)? HOT 2
- AttributeError: Module 'time' has no attribute 'clock'
- 想问下如何跑多个文件
- I cannot load the pretrained FlowNetS
- Training with MultiScale loss
- Should I extact "tar" for FlowNet2_checkpoint.pth.tar ?
- Groundtruth of my dataset!!!
- How to achieve the 3D version of correlation layer?
- CUDA error: the provided PTX was compiled with an unsupported toolchain
- start_epoch argument fix
- Error when training Flownet2S HOT 1
- Wrong calculation of EPE HOT 1
- Installation is a nightmare HOT 3
- TypeError: forward() takes 2 positional arguments but 3 were given,flownetc_flow2 = self.flownetc(x)[0].why!!!!
- cuda version HOT 2
- Segmentation fault
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flownet2-pytorch.