Code Monkey home page Code Monkey logo

Comments (5)

ysig avatar ysig commented on June 8, 2024

After searching a lot inside the code the issue is not related with pin_memory on the dataloader but with the private method __generate_indices__ of the distributed sampler.
It is a problem even if the dataset contains 500K images.

from genforce.

ysig avatar ysig commented on June 8, 2024

Even in the case of 200K images, I get the error:

Traceback (most recent call last):
  File "./train.py", line 117, in <module>
    main()
  File "./train.py", line 113, in main
    runner.train()
  File "/media/ilan/deepcomics/libs/genforce/runners/base_runner.py", line 287, in train
    self.train_step(data_batch, **train_kwargs)
  File "/home/libs/genforce/runners/stylegan_runner.py", line 34, in train_step
    G.synthesis.lod.data.fill_(self.lod)
  File "/home/miniconda3/envs/genforce/lib/python3.7/site-packages/torch/nn/modules/module.py", line 948, in __getattr__
    type(self).__name__, name))
AttributeError: 'SynthesisModule' object has no attribute 'lod'
Traceback (most recent call last):
  File "./train.py", line 117, in <module>
    main()
  File "./train.py", line 113, in main
    runner.train()
  File "/home/libs/genforce/runners/base_runner.py", line 287, in train
    self.train_step(data_batch, **train_kwargs)
  File "/home/libs/genforce/runners/stylegan_runner.py", line 34, in train_step
    G.synthesis.lod.data.fill_(self.lod)
  File "/home/miniconda3/envs/genforce/lib/python3.7/site-packages/torch/nn/modules/module.py", line 948, in __getattr__
    type(self).__name__, name))
AttributeError: 'SynthesisModule' object has no attribute 'lod'
Traceback (most recent call last):
  File "./train.py", line 117, in <module>
    main()
  File "./train.py", line 113, in main
    runner.train()
  File "/home/libs/genforce/runners/base_runner.py", line 287, in train
    self.train_step(data_batch, **train_kwargs)
  File "/home/libs/genforce/runners/stylegan_runner.py", line 34, in train_step
    G.synthesis.lod.data.fill_(self.lod)
  File "/home/miniconda3/envs/genforce/lib/python3.7/site-packages/torch/nn/modules/module.py", line 948, in __getattr__
    type(self).__name__, name))

My config is the same as here: #21

from genforce.

limbo0000 avatar limbo0000 commented on June 8, 2024

Hi @ysig,

Thanks for your issue. Could you please set the data.repeat as a small number like 10? The variable repeats the indices of the whole dataset multiple times, requiring large memory.

from genforce.

ysig avatar ysig commented on June 8, 2024

Thank you, I will try it.
But what about the lod error: #22 (comment) ?

Thanks

from genforce.

ShenYujun avatar ShenYujun commented on June 8, 2024

The lod variable is defined here. My guess is that you are using StyleGAN2 generator. Since StyleGAN2 does not require progressive training, lod will be of no use in the generator and hence not well-defined.

from genforce.

Related Issues (20)

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.