Giter Club home page Giter Club logo

Comments (8)

airdot avatar airdot commented on July 24, 2024

运行ctc_pytorch.ipynb文件下面语句时

epochs = 30
for epoch in range(1, epochs + 1):
    train(model, optimizer, epoch, train_loader)
    valid(model, optimizer, epoch, valid_loader)

提示:RuntimeError: DataLoader worker (pid(s) 2832, 15200, 1128, 7276, 11544, 12964, 9324, 4740, 2284, 5624, 7340, 13672) exited unexpectedly
请问如何解决

from captcha_break.

ypwhs avatar ypwhs commented on July 24, 2024

我这里运行起来没有问题,你可以尝试更新版本,pip install -U torch torchvision

from captcha_break.

chaotianjiao avatar chaotianjiao commented on July 24, 2024

@airdot 我也是同样的问题,torch是最新的1.3.1,也是这个错误,你解决了吗?

from captcha_break.

ypwhs avatar ypwhs commented on July 24, 2024

可以尝试将 num_workers 设置为 1 或者 0。

from captcha_break.

chaotianjiao avatar chaotianjiao commented on July 24, 2024

@airdot 找到了
train_loader = DataLoader(train_set, batch_size=batch_size, num_workers=12)
valid_loader = DataLoader(valid_set, batch_size=batch_size, num_workers=12)
把这两局的num_workers 设置为0就可以跑了,为1都不行
想问问这是为什么呢~o(╥﹏╥)o

from captcha_break.

ypwhs avatar ypwhs commented on July 24, 2024

@chaotianjiao
我这里跑起来没有问题,可能是 jupyter notebook 版本不一样的问题,可以尝试:

pip install -U jupyter

from captcha_break.

chaotianjiao avatar chaotianjiao commented on July 24, 2024

@ypwhs 嗯嗯,大佬,我是windows系统,winddows对torch的多线程好像有问题,就像你ISSUE里写的,大佬是在ubuntu下跑的吗?,num_workers=0 在jupyter 里才能跑, 我的jupyter=1.0.0版本

from captcha_break.

ypwhs avatar ypwhs commented on July 24, 2024

@chaotianjiao 是的,我是在 Ubuntu 18.04 下跑的。

有人对 Windows 下多进程进行了修复,你可以尝试使用他的解决方案:https://github.com/ypwhs/captcha_break/tree/master/Winpy

from captcha_break.

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.