Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1292, in _do_call
return fn(*args)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1277, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1367, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Quoted field has to end with quote followed by delim or end
[[{{node DecodeCSV}} = DecodeCSV[OUT_TYPE=[DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32, ..., DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_FLOAT], field_delim=",", na_value="", select_cols=[], use_quote_delim=true, _device="/device:CPU:0"](arg0, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_49)]]
[[{{node IteratorGetNext}} = IteratorGetNext[output_shapes=[[?], [?], [?], [?], [?], ..., [?,?], [?], [?], [?], [?]], output_types=[DT_FLOAT, DT_INT32, DT_FLOAT, DT_INT32, DT_FLOAT, ..., DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](OneShotIterator)]]
[[{{node input_layer/userOs_bucketized_embedding/userOs_bucketized_embedding_weights/SparseReshape/_7765}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_3975_...rseReshape", tensor_type=DT_INT64, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/din_209_test/dinPregrantModel/train.py", line 249, in <module>
tf.app.run(main=main)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/var/din_209_test/dinPregrantModel/train.py", line 170, in main
tf.estimator.train_and_evaluate(model, train_spec, eval_spec)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/estimator/training.py", line 471, in train_and_evaluate
return executor.run()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/estimator/training.py", line 610, in run
return self.run_local()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/estimator/training.py", line 711, in run_local
saving_listeners=saving_listeners)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/estimator/estimator.py", line 356, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/estimator/estimator.py", line 1181, in _train_model
return self._train_model_default(input_fn, hooks, saving_listeners)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/estimator/estimator.py", line 1215, in _train_model_default
saving_listeners)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/estimator/estimator.py", line 1409, in _train_with_estimator_spec
_, loss = mon_sess.run([estimator_spec.train_op, estimator_spec.loss])
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/monitored_session.py", line 671, in run
run_metadata=run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/monitored_session.py", line 1148, in run
run_metadata=run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/monitored_session.py", line 1239, in run
raise six.reraise(*original_exc_info)
File "/usr/local/lib/python3.5/dist-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/monitored_session.py", line 1224, in run
return self._sess.run(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/monitored_session.py", line 1296, in run
run_metadata=run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/monitored_session.py", line 1076, in run
return self._sess.run(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 887, in run
run_metadata_ptr)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1110, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1286, in _do_run
run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1308, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Quoted field has to end with quote followed by delim or end
[[{{node DecodeCSV}} = DecodeCSV[OUT_TYPE=[DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_INT32, ..., DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_FLOAT], field_delim=",", na_value="", select_cols=[], use_quote_delim=true, _device="/device:CPU:0"](arg0, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, DecodeCSV/record_defaults_49, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, strided_slice/stack, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_72, DecodeCSV/record_defaults_49)]]
[[{{node IteratorGetNext}} = IteratorGetNext[output_shapes=[[?], [?], [?], [?], [?], ..., [?,?], [?], [?], [?], [?]], output_types=[DT_FLOAT, DT_INT32, DT_FLOAT, DT_INT32, DT_FLOAT, ..., DT_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](OneShotIterator)]]
[[{{node input_layer/userOs_bucketized_embedding/userOs_bucketized_embedding_weights/SparseReshape/_7765}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_3975_...rseReshape", tensor_type=DT_INT64, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
在tensorflow进行数据读取时,经常出现上述错误,于是在数据处理的时候加入
dataset = dataset.apply(tf.contrib.data.ignore_errors())
忽略数据某几条出错的操作,就完美解决