我正在尝试解决学习的分类任务。我是TF的新手,所以我用尽了调试的想法。实际上,这是一个细分任务。就像本教程一样,我尝试遵循:https://www.tensorflow.org/tutorials/images/segmentation#make_predictions 就我而言,如下图所示: model 区别在于我创建了自己的数据集。我有一张原始图像,其中9个动物类别分别为每个像素+ 1个背景类别手动注释。通过扩充原始图片,我创建了50张火车图和50张测试图像。然后,我用tf将它们转换为128x128格式并进行规范化。我对标签集也做了同样的事情。不幸的是,当我想运行以下代码时:
model_history = model.fit(train_tuple_dataset, epochs=EPOCHS,
steps_per_epoch=STEPS_PER_EPOCH,
validation_steps=VALIDATION_STEPS,
validation_data=test_tuple_dataset,
callbacks=[DisplayCallback()])
我得到这样的错误:
ValueError: No gradients provided for any variable: ['sequential_8/conv2d_transpose_10/kernel:0', 'sequential_8/batch_normalization_8/gamma:0', 'sequential_8/batch_normalization_8/beta:0', 'sequential_9/conv2d_transpose_11/kernel:0', 'sequential_9/batch_normalization_9/gamma:0', 'sequential_9/batch_normalization_9/beta:0', 'sequential_10/conv2d_transpose_12/kernel:0', 'sequential_10/batch_normalization_10/gamma:0', 'sequential_10/batch_normalization_10/beta:0', 'sequential_11/conv2d_transpose_13/kernel:0', 'sequential_11/batch_normalization_11/gamma:0', 'sequential_11/batch_normalization_11/beta:0', 'conv2d_transpose_14/kernel:0', 'conv2d_transpose_14/bias:0'].
您能帮我定位我的错误吗?我想知道是什么原因造成的。