Giter Club home page Giter Club logo

Comments (6)

zhujiapeng avatar zhujiapeng commented on September 25, 2024

The NCCL is the basis for running this code on multi-GPUs, you could run the code on a single GPU by removing it, but I am not sure whether the performance on a single GPU could reach the performance on multi-GPUs.

from idinvert.

ThomasDotCodes avatar ThomasDotCodes commented on September 25, 2024

Thank you, and understood. In a practical sense, I assume I could just remove this then, and not replace it with anything? (if using a single GPU):

if np.prod(grad_shape): # nccl does not support zero-sized tensors
g = nccl_ops.all_sum(g)

from idinvert.

zhujiapeng avatar zhujiapeng commented on September 25, 2024

Actually, if you use a single GPU, the code can not reach here. By the way, if you use a single GPU to training the encoder, you need to replace the sync_batch_norm in networks_encoder.py with conventional BatchNorm provided by TensorFlow.
code

from idinvert.

ThomasDotCodes avatar ThomasDotCodes commented on September 25, 2024

Thanks for the advice so far, looks like the import in optimizer.py wasn't the issue

In fact, I've removed all references to nccl as found here:
https://github.com/genforce/idinvert/search?q=nccl

yet still continue to get nccl related errors
image

It seems to be from here, but I'm not sure how to trace the issue further
https://github.com/genforce/idinvert/blob/master/dnnlib/tflib/network.py#L291

from idinvert.

zhujiapeng avatar zhujiapeng commented on September 25, 2024

The .pkl files contain the network's code I used in training and when it was loaded, the code in it will be directly used.

from idinvert.

ThomasDotCodes avatar ThomasDotCodes commented on September 25, 2024

Thank you for the explanation, that makes sense. Closing this as an issue.

from idinvert.

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.