【发布时间】:2020-09-12 03:04:00
【问题描述】:
我收到此错误 AttributeError: 'float' object has no attribute 'pop' in my Encoder-Decoder custom Keras model while using model.fit with custom train_step.我不明白这个错误发生在哪里。当我们不知道错误的位置时,我需要有关如何解决此类错误的帮助?
Epoch 1/10
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-561-573fadf7e010> in <module>()
----> 1 model.fit(dataset,epochs=10)
5 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/callbacks.py in _batch_update_progbar(self, logs)
921
922 logs = copy.copy(logs) if logs else {}
--> 923 batch_size = logs.pop('size', 0)
924 num_steps = logs.pop('num_steps', 1) # DistStrat can run >1 steps.
925 logs.pop('batch', None)
AttributeError: 'float' object has no attribute 'pop'
链接到我的代码:https://github.com/abhishek203/E-Abhishek/blob/master/Untitled4.ipynb
【问题讨论】:
标签: python keras tensorflow2.0 tf.keras