Git Product home page Git Product logo

Comments (8)

xg-chu avatar xg-chu commented on August 30, 2024

每个dataloader是每张卡的子进程分别初始化的,不会获得同样的图片。如果每张卡都获得同样的训练图片,会出现严重的掉点。

from crowddet.

zehuichen123 avatar zehuichen123 commented on August 30, 2024

额 我做了一个实验 如果把shuffle设为False,打印数据集取到的图片,每张卡对应的id是一样的诶...我的意思是 不一定重复 但是每张卡的dataiter都只在数据集里随机取1/num_gpu的图片 但是一个epoch跑完应该并不保证每张卡拿到的图片不重复

from crowddet.

xg-chu avatar xg-chu commented on August 30, 2024

shuffle都设置false了当然是顺序取图片啊

from crowddet.

zehuichen123 avatar zehuichen123 commented on August 30, 2024

举个例子来说吧 比如我有 [1,2,3,4,5,6,7,8]这么多图 拿两张卡训练 每张卡放两张图 那么iter_per_epoch=8 / (2 * 2) = 2,对于第一张卡来说 它会每次随机取两次,每次取两张图,比如两次分别取了[1,3], [5,4],然后第二张卡它也跟第一张卡一样 随机取了两次,两次取到的id是[2,3],[7,8] 那么第6张图片就不会在这个epoch被任何一张卡训练到

from crowddet.

xg-chu avatar xg-chu commented on August 30, 2024

每个epoch过程中确实不保证遍历整个数据集,但是由于每张卡自行shuffle,各自train几个epoch后,每张卡都会独立的遍历一遍数据集。比如使用8卡,那么8个epoch后,每张卡都遍历了整个数据集。

from crowddet.

zehuichen123 avatar zehuichen123 commented on August 30, 2024

懂了~哈哈哈 这种写法好奇怪啊 感谢解答~

from crowddet.

xg-chu avatar xg-chu commented on August 30, 2024

对点数影响极小,写起来又方便😉

from crowddet.

zehuichen123 avatar zehuichen123 commented on August 30, 2024

学习了😎

from crowddet.

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.