AttributeError: объект 'NoneType' не имеет атрибута 'device' в Tensorflow - PullRequest
0 голосов
/ 03 апреля 2020

Я следовал учебному пособию https://medium.com/@a.ydobon / tenorflow-2-0-load-csv-to-tenorflow-2634f7089651 и в значительной степени скопировал код и слегка его отредактировал. Затем код работает нормально (хотя все еще экспериментирует с точностью), я получаю следующие ошибки.

Epoch 1/2
2020-04-03 19:29:38.768436: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
    300/Unknown - 3s 9ms/step - loss: 0.5797 - accuracy: 0.73472020-04-03 19:29:40.261383: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
         [[sequential/dense_features_2/PARTY_indicator/to_sparse_input/NotEqual/_26]]
2020-04-03 19:29:40.261425: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
300/300 [==============================] - 3s 9ms/step - loss: 0.5797 - accuracy: 0.7347
Epoch 2/2
288/300 [===========================>..] - ETA: 0s - loss: 0.5769 - accuracy: 0.73472020-04-03 19:29:41.563305: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
         [[sequential/dense_features_2/LIABILITIES_indicator/to_sparse_input/NotEqual/_24]]
2020-04-03 19:29:41.567499: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
300/300 [==============================] - 1s 4ms/step - loss: 0.5737 - accuracy: 0.7393
    300/Unknown - 1s 5ms/step - loss: 0.5648 - accuracy: 0.74272020-04-03 19:29:43.017756: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
         [[sequential/dense_features_2/ASSETS_indicator/SparseToDense/_46]]
2020-04-03 19:29:43.017795: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
300/300 [==============================] - 1s 5ms/step - loss: 0.5648 - accuracy: 0.7427


Test Loss 0.5647697952389718, Test Accuracy 0.7426666617393494
2020-04-03 19:29:44.132577: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
         [[sequential/dense_features_2/ASSETS_indicator/to_sparse_input/NotEqual/_8]]
2020-04-03 19:29:44.135984: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
         [[{{node IteratorGetNext}}]]
Predicted Victory: 34.71%  | Actual outcome:  0
Predicted Victory: 25.69%  | Actual outcome:  1
Predicted Victory: 17.46%  | Actual outcome:  0
Predicted Victory: 35.46%  | Actual outcome:  1
Predicted Victory: 21.07%  | Actual outcome:  1
Exception ignored in: <function _RandomSeedGeneratorDeleter.__del__ at 0x000002660A492948>
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3009, in __del__
AttributeError: 'NoneType' object has no attribute 'device'
Exception ignored in: <function _RandomSeedGeneratorDeleter.__del__ at 0x000002660A492948>
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3009, in __del__
AttributeError: 'NoneType' object has no attribute 'device'
Exception ignored in: <function _RandomSeedGeneratorDeleter.__del__ at 0x000002660A492948>
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3009, in __del__
AttributeError: 'NoneType' object has no attribute 'device'
Exception ignored in: <function _RandomSeedGeneratorDeleter.__del__ at 0x000002660A492948>
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3009, in __del__
AttributeError: 'NoneType' object has no attribute 'device'
Exception ignored in: <function _RandomSeedGeneratorDeleter.__del__ at 0x000002660A492948>
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3009, in __del__
AttributeError: 'NoneType' object has no attribute 'device'
Exception ignored in: <function _RandomSeedGeneratorDeleter.__del__ at 0x000002660A492948>
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3009, in __del__
AttributeError: 'NoneType' object has no attribute 'device'
Exception ignored in: <function _RandomSeedGeneratorDeleter.__del__ at 0x000002660A492948>
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3009, in __del__
AttributeError: 'NoneType' object has no attribute 'device'
...