Models: official/wide_deep/ I got the error when training

Created on 12 Dec 2017  路  6Comments  路  Source: tensorflow/models

As I do the "python wide_deep.py",the training has started. However,not as soon,the training is stopped by error.
Here is the error and full log:

INFO:tensorflow:Create CheckpointSaverHook.
2017-12-12 16:46:34.313548: I C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
INFO:tensorflow:Saving checkpoints for 1 into C:\Users\shakugan\Desktop\tensorflow_data\census_model\model.ckpt.
INFO:tensorflow:loss = 942.8, step = 1
INFO:tensorflow:global_step/sec: 194.804
INFO:tensorflow:loss = 0.702311, step = 101 (0.513 sec)
INFO:tensorflow:global_step/sec: 470.445
INFO:tensorflow:loss = 0.401036, step = 201 (0.213 sec)
INFO:tensorflow:global_step/sec: 437.43
INFO:tensorflow:loss = 0.246581, step = 301 (0.228 sec)
INFO:tensorflow:global_step/sec: 447.241
INFO:tensorflow:loss = 0.169875, step = 401 (0.225 sec)
2017-12-12 16:46:43.081101: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Invalid argument: Expect 15 fields but have 0 in record 0
[[Node: DecodeCSV = DecodeCSVOUT_TYPE=[DT_INT32, DT_STRING, DT_INT32, DT_STRING, DT_INT32, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_INT32, DT_INT32, DT_INT32, DT_STRING, DT_STRING], field_delim=",", na_value="", use_quote_delim=true]]
Traceback (most recent call last):
File "C:\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1323, in _do_call
return fn(*args)
File "C:\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1302, in _run_fn
status, run_metadata)
File "C:\python\anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Expect 15 fields but have 0 in record 0
[[Node: DecodeCSV = DecodeCSV[OUT_TYPE=[DT_INT32, DT_STRING, DT_INT32, DT_STRING, DT_INT32, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_INT32, DT_INT32, DT_INT32, DT_STRING, DT_STRING], field_delim=",", na_value="", use_quote_delim=true](arg0, DecodeCSV/record_defaults_0, DecodeCSV/record_defaults_1, DecodeCSV/record_defaults_2, DecodeCSV/record_defaults_3, DecodeCSV/record_defaults_4, DecodeCSV/record_defaults_5, DecodeCSV/record_defaults_6, DecodeCSV/record_defaults_7, DecodeCSV/record_defaults_8, DecodeCSV/record_defaults_9, DecodeCSV/record_defaults_10, DecodeCSV/record_defaults_11, DecodeCSV/record_defaults_12, DecodeCSV/record_defaults_13, DecodeCSV/record_defaults_14)]]
[[Node: IteratorGetNext = IteratorGetNext[output_shapes=[[?], [?], [?], [?], [?], [?], [?], [?], [?], [?], [?], [?], [?], [?], [?]], output_types=[DT_INT32, DT_INT32, DT_INT32, DT_STRING, DT_INT32, DT_INT32, DT_STRING, DT_INT32, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_BOOL], _device="/job:localhost/replica:0/task:0/device:CPU:0"](OneShotIterator)]]

Most helpful comment

delete the blank line in the training and test data will solve your problem.

All 6 comments

This sounds like a problem with your data. What data are you using?

In either case, you should turn to stack overflow for such questions. The issue tracker is only for bugs and feature requests.

This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there. Thanks!

Check the path to the training and evaluation data. I had the same error and discovered a typo in my environment variables.

delete the blank line in the training and test data will solve your problem.

Removing 1st line entry

1x3 Cross validator

from adult.test (Census example wide and deep) worked for me
https://github.com/tensorflow/models/tree/master/official/wide_deep

Just as andyxzq and karankaw said, removing the last blank line in adult.data and adult.test. and removing the 1st comment line in adult.test. this works for me.

Was this page helpful?
0 / 5 - 0 ratings