简体   繁体   English

TensorFlow训练数据错误。 ValueError

[英]TensorFlow training data Error. ValueError

Im currently working on a tensorflow project and I am getting this error. 我目前正在研究一个tensorflow项目,但出现此错误。

ValueError: model_config not of type model_pb2.DetectionModel. ValueError:model_config的类型不是model_pb2.DetectionModel。

It happens when I'm trying to train my model. 当我尝试训练模型时会发生这种情况。 Has anyone encountered this issue before? 有人遇到过这个问题吗? First question asked on here so be gentle. 在这里问的第一个问题要轻柔。

`Chinatowns-MacBook-Air:object_detection nathangrant$ python3 train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.7
  return f(*args, **kwds)
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/platform/app.py:48: main (from __main__) is deprecated and will be removed in a future version.
Instructions for updating:
Use object_detection/model_main.py.
Traceback (most recent call last):
  File "train.py", line 184, in <module>
    tf.app.run()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 136, in new_func
    return func(*args, **kwargs)
  File "train.py", line 180, in main
    graph_hook_fn=graph_rewriter_fn)
  File "/Users/nathangrant/Downloads/models-master/research/object_detection/legacy/trainer.py", line 245, in train
    detection_model = create_model_fn()
  File "/Users/nathangrant/Downloads/models-master/research/object_detection/builders/model_builder.py", line 105, in build
    raise ValueError('model_config not of type model_pb2.DetectionModel.')
ValueError: model_config not of type model_pb2.DetectionModel.`

In my computer, I did these and fixed this problem: 在我的计算机上,我做了这些操作并解决了这个问题:

In model_builder.py , don't use model_builder.py ,不要使用

from protos import model_pb2

use 采用

from object_detection.protos import model_pb2

instead. 代替。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复张量流中的“ValueError: Empty Training Data”错误 - How to fix 'ValueError: Empty Training Data' error in tensorflow 训练 ProGAN:ValueError:数据基数不明确(tensorflow/keras) - Training a ProGAN : ValueError: Data cardinality is ambiguous (tensorflow/keras) 在培训期间,我收到以下错误。 “ ValueError:没有为任何变量提供梯度” - Whie training I am getting the following error. “ ValueError: No gradients provided for any variable” 训练不断。 元组错误。 (Tensorflow Object_detection API) - Training keeps stopping. Tuple error. (Tensorflow Object_detection API) 张量流训练的第一个纪元结束时出现ValueError - ValueError in the first epoch ending of tensorflow training session.run上的Tensorflow ValueError与批处理培训 - Tensorflow ValueError on session.run with batch training 获取错误“ ValueError:int()的无效文字,基数为10:&#39;3128;&#39; 在运行Tensorflow训练示例时 - Getting an error "ValueError: invalid literal for int() with base 10: '3128;' while running the Tensorflow training example 数据增强 TensorFlow 训练数据时如何修复错误? - How to fix the error when data augmenting TensorFlow training data? 使用Tensorflow和我们自己的数据进行训练时出错 - Error during training using Tensorflow with our own data 训练时出错:tensorflow:你的输入数据用完了; 中断训练 - Error while training: tensorflow:Your input ran out of data; interrupting training
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM