tflearn.DNN:AttributeError:' NoneType'对象没有属性’'

时间:2017-05-24 10:10:44

标签: python conv-neural-network tflearn

运行下面的代码时,会出现标题行中的错误。

            model = tflearn.DNN(network,tensorboard_verbose=0, checkpoint_path='classifier.tfl.ckpt')

似乎问题出在tf.DNN上。回溯如下。

            Traceback (most recent call last):
              File "/Users/may/PycharmProjects/cnn/cnn.py", line 67, in <module>
                model = tflearn.DNN(network,tensorboard_verbose=0,checkpoint_path='classifier.tfl.ckpt')
              File "/Library/Python/2.7/site-packages/tflearn/models/dnn.py", line 64, in __init__
                best_val_accuracy=best_val_accuracy)
              File "/Library/Python/2.7/site-packages/tflearn/helpers/trainer.py", line 131, in __init__
                clip_gradients)
              File "/Library/Python/2.7/site-packages/tflearn/helpers/trainer.py", line 616, in initialize_training_ops
                self.validation_monitors_T = [tf.Variable(0., name='%s_T' % v.name.rsplit(':', 1)[0], trainable=False) for v in self.validation_monitors]
            AttributeError: 'NoneType' object has no attribute 'rsplit'

0 个答案:

没有答案