Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我想训练自己的模型但是报错了 #20

Open
sherrygux opened this issue May 2, 2023 · 10 comments
Open

我想训练自己的模型但是报错了 #20

sherrygux opened this issue May 2, 2023 · 10 comments

Comments

@sherrygux
Copy link

我想训练512的模型,把尺寸改了但是有如下错误
2023-05-02 13:07:23.003633: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_0' with dtype string and shape [1]
[[{{node Placeholder/_0}}]]
2023-05-02 13:07:23.003876: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_0' with dtype string and shape [1]
[[{{node Placeholder/_0}}]]
Traceback (most recent call last):
File "/pfs/data5/home/kit/wbk/ea7309/ssd512_py3.8/TensorFlow2.0_SSD/train.py", line 94, in
main()
File "/pfs/data5/home/kit/wbk/ea7309/ssd512_py3.8/TensorFlow2.0_SSD/train.py", line 52, in main
loss_l, loss_c = loss_fn(y_true=labels, y_pred=predictions)
File "/pfs/data5/home/kit/wbk/ea7309/ssd512_py3.8/TensorFlow2.0_SSD/core/loss.py", line 46, in call
pos_idx = tf.broadcast_to(pos_idx, shape=loc_data.shape)
File "/opt/bwhpc/common/jupyter/tensorflow/2023-03-24/lib/python3.9/site-packages/tensorflow/python/ops/gen_array_ops.py", line 864, in broadcast_to
return broadcast_to_eager_fallback(
File "/opt/bwhpc/common/jupyter/tensorflow/2023-03-24/lib/python3.9/site-packages/tensorflow/python/ops/gen_array_ops.py", line 910, in broadcast_to_eager_fallback
_result = _execute.execute(b"BroadcastTo", 1, inputs=_inputs_flat,
File "/opt/bwhpc/common/jupyter/tensorflow/2023-03-24/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 52, in quick_execute
tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node _wrapped__BroadcastTo_device/job:localhost/replica:0/task:0/device:GPU:0}} Incompatible shapes: [8,8732,1] vs. [8,24656,4] [Op:BroadcastTo]

@calmiLovesAI
Copy link
Owner

我现在不用TensorFlow了,你可以用我最新写的这个代码:https://github.com/calmisential/DeepLearning.pytorch,里面有SSD算法

@sherrygux
Copy link
Author

我现在不用TensorFlow了,你可以用我最新写的这个代码:[https://github.com/calmisential/DeepLearning.pytorch,里面有SSD算法]我打开不了这个网页

@calmiLovesAI
Copy link
Owner

@calmiLovesAI
Copy link
Owner

SSD的配置文件是:
https://github.com/calmisential/DeepLearning.pytorch/blob/main/configs/ssd_cfg.py
你可以在其中修改相关训练参数
接着把train.py里面的CONFIG修改为ssd的配置文件路径,然后运行train.py就可以开始训练了。
ssd要训出好的效果很难,建议你直接用我这个仓库里面的YOLOv8来做目标检测

@sherrygux
Copy link
Author

如果我使用的是512*512的图是直接改ssd_ cfg的尺寸就可以了嘛

@calmiLovesAI
Copy link
Owner

如果我使用的是512*512的图是直接改ssd_ cfg的尺寸就可以了嘛

输入只能是300*300,SSD512的网络结构与SSD300不一样,后续我有时间会把SSD512加上去

@sherrygux
Copy link
Author

好的,谢谢

@calmiLovesAI
Copy link
Owner

好的,谢谢

我更新了代码,现在可以输入512*512尺寸的图片了

@sherrygux
Copy link
Author

你有git push吗?为什么我没看到有更改呢?

@calmiLovesAI
Copy link
Owner

你有git push吗?为什么我没看到有更改呢?

这是commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants