Giter Site home page Giter Site logo

Comments (10)

RanKoala avatar RanKoala commented on June 22, 2024 1

将一些开始通过.sh脚本里传入的必要的参数通过argparse形式在unimatch.py里传入。然后将rank, world_size等获取判断的条件删除,接着再将model和data有关多卡的代码调整下就可以了。如:torch.nn.parallel.DistributedDataParallel,torch.nn.SyncBatchNorm.convert_sync_batchnorm(model),torch.utils.data.distributed.DistributedSampler

from unimatch.

LiheYoung avatar LiheYoung commented on June 22, 2024

抱歉这样很难看出来问题,有可能是因为对模型输出的处理不当。

from unimatch.

YKtzo avatar YKtzo commented on June 22, 2024

好的,谢谢您的回复

from unimatch.

RanKoala avatar RanKoala commented on June 22, 2024

抱歉这样很难看出来问题,有可能是因为对模型输出的处理不当。

作者你好!我看论文是多卡代码,请问如果是单机单卡需要配置哪些参数?谢谢

from unimatch.

LiheYoung avatar LiheYoung commented on June 22, 2024

只需要在执行训练指令的时候将num_gpus定为1即可。

from unimatch.

RanKoala avatar RanKoala commented on June 22, 2024

只需要在执行训练指令的时候将num_gpus定为1即可。

在本地IDE想调试代码,不使用.sh的方式运行代码,直接运行unimatch.py文件。这种情况下该如何指定呢?
目前直接运行在 rank = int(os.environ["RANK"])即会报错。
是否需要将unimatch.py里相关DDP的代码屏蔽?
谢谢作者耐心解答。

from unimatch.

LiheYoung avatar LiheYoung commented on June 22, 2024

由于需要传参,所以需要在command里执行,不能直接运行unimatch.py

from unimatch.

RanKoala avatar RanKoala commented on June 22, 2024

由于需要传参,所以需要在command里执行,不能直接运行unimatch.py

nproc_per_node ,master_port这两个参数确实需要命令里传入,这是DDP机制决定吧(目前了解情况)。
不过我修改了unimatch.py里DDP的代码,可以直接运行了,感谢作者。

from unimatch.

chenyzzz avatar chenyzzz commented on June 22, 2024

nproc_per_node ,master_port这两个参数确实需要命令里传入,这是DDP机制决定吧(目前了解情况)。
不过我修改了unimatch.py里DDP的代码,可以直接运行了,感谢作者。

您好,我也是单机单卡本地IDE想调试代码,想问一下应该如何修改unimatch.py里DDP的代码使其可以直接运行呢?非常感谢!期待您的回复!也感谢作者的代码,很棒的工作!

from unimatch.

chenyzzz avatar chenyzzz commented on June 22, 2024

将一些开始通过.sh脚本里传入的必要的参数通过argparse形式在unimatch.py里传入。然后将rank, world_size等获取判断的条件删除,接着再将model和data有关多卡的代码调整下就可以了。如:torch.nn.parallel.DistributedDataParallel,torch.nn.SyncBatchNorm.convert_sync_batchnorm(model),torch.utils.data.distributed.DistributedSampler

感谢您的指点!很有用!

from unimatch.

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.