Giter VIP home page Giter VIP logo

Comments (7)

woshiwoyali avatar woshiwoyali commented on July 18, 2024

执行命令:
python run.py --data_url='../garbage_classify/train_data' --train_url='./model_snapshots' --deploy_script_path='./deploy_scripts'
修改train.py第48行model = multi_gpu_model(model,1)改成1。
添加GPU编号os.environ["CUDA_VISIBLE_DEVICES"] = "0"
运行报错:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
/home/zjs/Desktop/laji/garbage/train.py:48: UserWarning: Update your Model call to the Keras 2 API: Model(inputs=Tensor("in..., outputs=Tensor("de...)
model = Model(input=model.input, output=predictions)
Traceback (most recent call last):
File "run.py", line 166, in
tf.app.run()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "run.py", line 157, in main
train_model(FLAGS)
File "/home/zjs/Desktop/laji/garbage/train.py", line 90, in train_model
model = model_fn(FLAGS, objective, optimizer, metrics)
File "/home/zjs/Desktop/laji/garbage/train.py", line 49, in model_fn
model = multi_gpu_model(model,1) # 修改成自身需要的GPU数量,4代表用4个GPU同时加载程序
File "/usr/local/lib/python3.6/dist-packages/keras/utils/multi_gpu_utils.py", line 165, in multi_gpu_model
'Received: gpus=%d' % gpus)
ValueError: For multi-gpu usage to be effective, call multi_gpu_model with gpus >= 2. Received: gpus=1
请问,在单GPU的模式下,可以运行吗?如果可以依据这个报错,我需要如何修改代码?

from garbage_classify.

mars918 avatar mars918 commented on July 18, 2024

同问,我的笔记本想跑一一下,跑不起来

from garbage_classify.

Aurevious avatar Aurevious commented on July 18, 2024

把train.py第48行model = multi_gpu_model(model,1)注释掉就跑通了。

from garbage_classify.

Miger0629 avatar Miger0629 commented on July 18, 2024

把train.py第48行model = multi_gpu_model(model,1)注释掉就跑通了。

请问你有没有遇到 BrokenPipeError: [Errno 32] Broken pipe 这个问题,有的话是怎么解决的,谢谢

from garbage_classify.

cy-dream avatar cy-dream commented on July 18, 2024

ValueError: To call multi_gpu_model with gpus=2, we expect the following devices to be available: ['/cpu:0', '/gpu:0', '/gpu:1']. However this machine only has: ['/cpu:0']. Try reducing gpus.
我有两个GPU但是不知道为什么说我没有

from garbage_classify.

Super-Alpha avatar Super-Alpha commented on July 18, 2024

把train.py第48行model = multi_gpu_model(model,1)注释掉就跑通了。

请问你有没有遇到 BrokenPipeError: [Errno 32] Broken pipe 这个问题,有的话是怎么解决的,谢谢

同问!

from garbage_classify.

Jeremy32-ohh avatar Jeremy32-ohh commented on July 18, 2024

把train.py第48行model = multi_gpu_model(model,1)注释掉就跑通了。

请问你有没有遇到 BrokenPipeError: [Errno 32] Broken pipe 这个问题,有的话是怎么解决的,谢谢

同问!

请问 BrokenPipeError: [Errno 32] Broken pipe 这个问题现在解决了吗?我也遇到了,请问怎么解决这个呀?在代码中也找不到num_workers,多数解答都是说把num_workers=0取消多进程即可,但是未找到代码中有这个。

from garbage_classify.

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.