Comments (7)
执行命令:
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.
同问,我的笔记本想跑一一下,跑不起来
from garbage_classify.
把train.py第48行model = multi_gpu_model(model,1)注释掉就跑通了。
from garbage_classify.
把train.py第48行model = multi_gpu_model(model,1)注释掉就跑通了。
请问你有没有遇到 BrokenPipeError: [Errno 32] Broken pipe 这个问题,有的话是怎么解决的,谢谢
from garbage_classify.
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.
把train.py第48行model = multi_gpu_model(model,1)注释掉就跑通了。
请问你有没有遇到 BrokenPipeError: [Errno 32] Broken pipe 这个问题,有的话是怎么解决的,谢谢
同问!
from garbage_classify.
把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)
- 请问作者有训练好的模型吗?想写一个网页应用 HOT 1
- 作者你好customize_service这个文件的一个库 from model_service.tfserving_model_service import TfServingBaseService 在你的源码中没有 HOT 1
- 关于.h5文件 HOT 1
- Tensor Tensor("input_1:0", shape=(?, 456, 456, 3), dtype=float32) is not an element of this graph. HOT 3
- 我也存在这样的问题,请问你解决了吗 HOT 2
- 有人一起做吗,咱们建个微信群讨论吧, HOT 2
- 跑通这个项目需要哪几步? HOT 2
- 关于在第一轮回调时的报错信息 HOT 4
- 关于mean_std.py HOT 1
- 关于准确度和loss值 HOT 2
- 关于准确率和验证集和测试集 HOT 1
- 您好,我在配置的时候总是出错
- ModuleNotFoundError: No module named 'keras' HOT 2
- SVM作用是什么?为什么要加svm? HOT 1
- 找不到指定模块 HOT 1
- 有没有训练好的模型参考下,这边训练太慢了
- TypeError: Cannot interpret feed_dict key as Tensor: Tensor Tensor("input_1:0", shape=(?, 456, 456, 3), dtype=float32) is not an element of this graph. HOT 7
- 关于准确率的小问题 HOT 1
- 数据集没有了 HOT 2
- TypeError: Cannot interpret feed_dict key as Tensor: Tensor Tensor("input_1:0", shape=(?, 456, 456, 3), dtype=float32) is not an element of this graph. #49 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from garbage_classify.