Я пытаюсь создать образец бостона тензорного потока (https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/tutorials/input_fn) работает над google cloudml, и мне кажется, что обучение прошло успешно, но я не могу понять последующие прогнозы.
Я настроил код, чтобы он соответствовал tf.contrib.learn.Experiment и learn_runner.run (). Он работает как локально, так и в облаке с "gcloud ml-engine local train ..." / "gcloud ml-engine jobs submit training ...".
Я могу с помощью обученной модели запустить Estimator.predict (input_fn = pred_input_fn)) и получить значимые прогнозы с заданным набором boston_predict.csv.
Я могу создать и версию модели в облаке с помощью "gcloud ml-engine models create ..." и "gcloud ml-engine versions create ..."
Но
- Локальные предсказания по «gcloud ml-engine local pred --model-dir = / export / Servo / XXX --text-instance boston_predict.csv» не выполняются с ошибкой «InvalidArgumentError (см. Выше для трассировки): не удалось проанализировать ввод примера‹. .> (Код ошибки: 2). Транскрипт см. Ниже. Аналогично происходит сбой при использовании файла boston_predict.csv без заголовка.
Я нашел ожидаемый формат с помощью "$ gcloud ml-engine local pred --help", прочтите https://cloud.google.com/ml-engine/docs/how-tos/troubleshooting, но в целом не удалось найти отчеты о моей конкретной ошибке через Google или stackexhange.
Я новичок, так что я, вероятно, в чем-то ошибаюсь, но не могу этого заметить.
Любая помощь приветствуется,
:-)
yarc68000.
-------среда----------
(env1) $ gcloud --version
Google Cloud SDK 170.0.0
alpha 2017.03.24
beta 2017.03.24
bq 2.0.25
core 2017.09.01
datalab 20170818
gcloud
gsutil 4.27
(env1) $ python --version
Python 2.7.13 :: Anaconda 4.3.1 (64-bit)
(env1) $ conda list | grep tensorflow
tensorflow 1.3.0 <pip>
tensorflow-tensorboard 0.1.6 <pip>
------------ выполнение и ошибка: boston_predict.csv ----------
$ gcloud ml-engine local predict --model-dir=<..>/export/Servo/1504780684 --text-instances 1709boston/boston_predict.csv
<..>
ERROR:root:Exception during running the graph: Could not parse example input, value: 'CRIM,ZN,INDUS,NOX,RM,AGE,DIS,TAX,PTRATIO'
[[Node: ParseExample/ParseExample = ParseExample[Ndense=9, Nsparse=0, Tdense=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], dense_shapes=[[1], [1], [1], [1], [1], [1], [1], [1], [1]], sparse_types=[], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_Placeholder_0_0, ParseExample/ParseExample/names, ParseExample/ParseExample/dense_keys_0, ParseExample/ParseExample/dense_keys_1, ParseExample/ParseExample/dense_keys_2, ParseExample/ParseExample/dense_keys_3, ParseExample/ParseExample/dense_keys_4, ParseExample/ParseExample/dense_keys_5, ParseExample/ParseExample/dense_keys_6, ParseExample/ParseExample/dense_keys_7, ParseExample/ParseExample/dense_keys_8, ParseExample/Const, ParseExample/Const_1, ParseExample/Const_2, ParseExample/Const_3, ParseExample/Const_4, ParseExample/Const_5, ParseExample/Const_6, ParseExample/Const_7, ParseExample/Const_8)]]
<..>
------- выполнение и ошибка без заголовка boston_predict.csv ------
(здесь я пробую с boston_predict.csv с опущенной первой строкой)
$ gcloud ml-engine local predict --model-dir=<..>/export/Servo/1504780684 --text-instances 1709boston/boston_predict_headerless.csv
<..>
ERROR:root:Exception during running the graph: Could not parse example input, value: '0.03359,75.0,2.95,0.428,7.024,15.8,5.4011,252,18.3'
[[Node: ParseExample/ParseExample = ParseExample[Ndense=9, Nsparse=0, Tdense=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], dense_shapes=[[1], [1], [1], [1], [1], [1], [1], [1], [1]], sparse_types=[], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_Placeholder_0_0, ParseExample/ParseExample/names, ParseExample/ParseExample/dense_keys_0, ParseExample/ParseExample/dense_keys_1, ParseExample/ParseExample/dense_keys_2, ParseExample/ParseExample/dense_keys_3, ParseExample/ParseExample/dense_keys_4, ParseExample/ParseExample/dense_keys_5, ParseExample/ParseExample/dense_keys_6, ParseExample/ParseExample/dense_keys_7, ParseExample/ParseExample/dense_keys_8, ParseExample/Const, ParseExample/Const_1, ParseExample/Const_2, ParseExample/Const_3, ParseExample/Const_4, ParseExample/Const_5, ParseExample/Const_6, ParseExample/Const_7, ParseExample/Const_8)]]
<..>