一、错误地方展示
错误如下图所示
二、解决问题
通过大量的尝试,最终定位到feed_dict = {image_holder:img_batch, label_holder:lbl_batch, keep_prob:0.6}
TypeError:int() argument must be a string,a bytes-like object or a number,not 'list' 意思是:
int()参数必须是字符串、类似字节的对象或数字,而不是“list”
我们把 img_batch 和 lbl_batch 打印出来,结果如下图
print(img_batch, img_batch.shape)
print(lbl_batch, lbl_batch.shape)
果然lbl_batch输入里面含有list,我们把lbl_batch换成np.array类型问题就解决了。