我遵循了“训练自定义对象检测器”教程(https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html)
运行脚本以继续训练预训练模型时:
python model_main_tf2.py --model_dir=models/my_ssd_resnet50_v1_fpn --pipeline_config_path=models/my_ssd_resnet50_v1_fpn/pipeline.config
(在这里找到:https : //github.com/tensorflow/models/blob/master/research/object_detection/model_main_tf2.py)
使用不同的 numpy 版本,我收到以下错误。
场景#1:
NotImplementedError: Cannot convert a symbolic Tensor (cond_2/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
我在网上查看,它建议将 numpy 版本降级 < 1.20.0(NotImplementedError: Cannot convert a Symbolic Tensor (2nd_target:0) to a numpy array)。请注意,对于 tensorflow 2.2.0,numpy 版本必须 >= 1.19.2。
场景#2:
ValueError: numpy.ndarray size changed, may …