Giter VIP home page Giter VIP logo

vdsr-pytorch-tf2's Introduction

VDSR-pytorch-tf2

VDSR implementation with PyTorch and Tensorflow 2.

Pytorch

pytorch$ conda create -f pytorch_env.yml
pytorch$ conda activate torch
pytorch$ python main.py

Tensorflow2

tf2$ conda create -f tf2_env.yml
tf2$ conda activate tf2
tf2$ python run_vdsr.py

vdsr-pytorch-tf2's People

Contributors

parkseobin avatar shlee0 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

vdsr-pytorch-tf2's Issues

TODO: minor code improvements (pytorch)


Dataset hanging problem in Pytorch

There is a very nasty problem involving pytorch DataLoader. In the log below, you notice that dataloader delay is 6s while the overall epoch takes only 8s. Tensorflow2 only takes 3s for one epoch on same settings(TODO: make tf2 time consumption test code).

Log: (in branch pytorch_dataset_hanging_problem)

[*] Start training

***> dataloader delay: 5.8484
>> end of iteration (time interval: 0.0408) ) 


[2020-04-06 22:22:14]
>> epoch 1       loss: 0.045038 (lr: 1.00e-03)

***> dataloader delay: 6.1289
>> end of iteration (time interval: 0.0431) ) 


[2020-04-06 22:22:26]
>> epoch 2       loss: 0.001379 (lr: 1.00e-03)

Possible scenarios:

  1. On every start of epoch, there is a heavy operation done by DataLoader. For example, remaking threads, thus re-copying each resources.

  2. Iteration doesn't start until each worker completes on batch(=32).

Useful links:

https://discuss.pytorch.org/t/dataloader-with-num-workers-1-hangs-every-epoch/20323/9
https://discuss.pytorch.org/t/dataloader-resets-dataset-state/27960/4
https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.