Я развернул модель, сохраненную тензорным потоком в облачном ML для классификации текста со следующим:
input_x = graph.get_tensor_by_name('input_x:0')
keep_prob = graph.get_tensor_by_name('keep_prob:0')
predictions = graph.get_tensor_by_name('softmax/predictions:0')
feed_dict = {input_x: x_test, batch_size: 8, sequence_length: x_lengths, keep_prob: 1.0}
Ошибка развернута. У меня есть файл csv для прогнозов. --csv файл -
"the test is completed"
"the test2 is done"
Получение только ошибок. Как преобразовать это в json для модели, которую я обучал, для пакетного прогнозирования в облачном ML ??
save_model_cli - Информация
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['batch_size'] tensor_info:
dtype: DT_INT32
shape: ()
name: batch_size:0
inputs['input_x'] tensor_info:
dtype: DT_INT32
shape: (-1, 25)
name: input_x:0
inputs['keep_prob'] tensor_info:
dtype: DT_FLOAT
shape: ()
name: keep_prob:0
inputs['sequence_length'] tensor_info:
dtype: DT_INT32
shape: (-1)
name: sequence_length:0
The given SavedModel SignatureDef contains the following output(s):
outputs['predictions'] tensor_info:
dtype: DT_INT64
shape: (-1)
name: softmax/predictions:0
Method name is: tensorflow/serving/predict
В настоящее время я преобразовал csv в Json, используемый для прогнозирования:
{"sequence_length": 25, "batch_size": 1, "keep_prob": 1.0, "input_x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 1, 16, 12, 13, 14, 17, 18, 19, 20]}
Исключение:
Exception during running the graph: Cannot feed value of shape (1,) for Tensor u\'keep_prob:0\', which has shape \'()\' (Error code: 2)\n'
saved_model_cli show --all --dir /path/to/model
и предоставить результат? - person rhaertel80   schedule 13.08.2018