pythontensorflowmachine-learningkerasdeep-learning

tensorflow TypeError: cannot unpack non-iterable float object


I am using tensorflow V2.2 and run into TyepError when I do model.evaluate. Can someone advise what the issues may be? A screenshot of the execution and error message is shown below. enter image description here


Solution

  • you need to define a metric when you compile the model model.compile('adam', 'binary_crossentropy', metrics='accuracy')

    in this way during evaluation, loss and accuracy are returned