Tensor is not an element of this graph

前端 未结 7 1158
日久生厌
日久生厌 2020-12-02 15:49

I\'m getting this error

\'ValueError: Tensor Tensor(\"Placeholder:0\", shape=(1, 1), dtype=int32) is not an element of this graph.\'

相关标签:
7条回答
  • 2020-12-02 16:39

    I had this issue when trying to make a model using another class that uses keras to create a model. I got this issue corrected by doing the following

    import nn_classifierclass as cls
    from keras import backend
    for repeat in range(repeats):
        backend.clear_session() ##NOTICE THIS
        neural_net = cls.Classifier(.....)
        neural_net.keras_fcn_classifier()
    
    0 讨论(0)
提交回复
热议问题