Изображение имеет форму (512, 2048, 3)
, но при запуске я получаю ValueError preds_train = new_model.predict(img, batch_size=1)
:
ValueError: Could not find matching function to call loaded from the SavedModel. Got:
Positional arguments (3 total):
* Tensor("inputs:0", shape=(1, 2048, 3), dtype=float32)
* False
* None
Keyword arguments: {}
Expected these arguments to match one of the following 4 option(s):
Option 1:
Positional arguments (3 total):
* TensorSpec(shape=(None, 512, 2048, 3), dtype=tf.float32, name='inputs')
* True
* None
Keyword arguments: {}
Option 2:
Positional arguments (3 total):
* True
* None
Keyword arguments: {}
Option 3:
Positional arguments (3 total):
* TensorSpec(shape=(None, 512, 2048, 3), dtype=tf.float32, name='input_1')
* False
* None
Keyword arguments: {}
Option 4:
Positional arguments (3 total):
* TensorSpec(shape=(None, 512, 2048, 3), dtype=tf.float32, name='inputs')
* False
* None
Keyword arguments: {}
Я распечатал исходные размеры фигуры, поэтому уверен, что это (512, 2048, 3)
и, кроме того, когда я обучал модель, я использовал изображения этой формы. Не знаю, почему не могу протестировать модель.