Answers for "TypeError: cannot unpack non-iterable int object"

3

TypeError: cannot unpack non-iterable int object

In my error, I was using a dictionary. This error is saying you need to have items like a tulp (number, number) where it can itterate over.

for key,value in DICTIONARY.items(): # I added .items() 
    # do stuff here

This is what helped for me.
Have a lovely day, remember to eat and get enough sleep.
Posted by: Guest on April-11-2022
-1

TypeError: cannot unpack non-iterable float object evaluate

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
Posted by: Guest on September-30-2020

Code answers related to "TypeError: cannot unpack non-iterable int object"

Python Answers by Framework

Browse Popular Code Answers by Language