0
Follow
2
View

TensorFlow Error: dictionary update sequence element #0 has length 6; 2 is required

zzbbenben 注册会员
2023-01-26 03:55

You are getting this error because of your creating a dictionary in improper format.

For example:

t1 = ('a','b','c','d')
t2 = (1,2,3,4)
dict(t1) #output: ValueError: dictionary update sequence element #0 has length 1; 2 is required
dict(zip(t1,t2)) #output: {'a': 1, 'b': 2, 'c': 3, 'd': 4}

By creating a dictionary using the dict function with proper format will not produce that error. Thank You!