tensorflow问题总结

目录

1、tensorflow python framework erros invalidArgmentError:connot batch tensors with different shapes in componet 0. First element had shape [227,227,3] and element 19 had shape [227,227,4]

2、incompatible type conversion requested to type 'uint8' for variable of type 'float32'

3、invalid literal for int() with base 10:

4、image.resize_images()#返回float

5、runtimeerror: Invalid DISPLAY variable

6、无法显示图片可以保存图片:

7、feed数据的时候不可以读进去tensor类型

8、a = sess.run(one_element[0])

9、不可以用两个one_element

10、Rank mismatch: Rank of labels(received 2) should equal rank of logits minus 1(recevied 2)

11、Y = tf.placeholder(tf.float32, [None])

12、Img.resize(227,227)提示unknown resampling filter

13、Tensorflow使用变量出现错误: List of Tensors when single Tensor expected

14、Tensorflow出错:Exception in QueueRunner: Enqueue operation was cancelled


 

 

在进行tensorflow学习的时候遇到各种各样的问题,为了不在同一个坑中踩多次,将问题总结一下。

1、tensorflow python framework erros invalidArgmentError:connot batch tensors with different shapes in componet 0. First element had shape [227,227,3] and element 19 had shape [227,227,4]

 

记得检查数据通道: convert('RGB')

 

2、incompatible type conversion requested to type 'uint8' for variable of type 'float32'

 

读进Conv2D的数据应该是float

 

3、invalid literal for int() with base 10:

 

txt文件下行千万不要有空格

 

4、image.resize_images()#返回float

     image.resize_images_with_crop_or_pad()#返回unit8

 

5、runtimeerror: Invalid DISPLAY variable

 

1.问题:在本地用matplotlib绘图可以,但是在ssh远程绘图的时候会报错 RuntimeError: Invalid DISPLAY variable

2.原因:matplotlib的默认backendTkAgg,而FltkAgg, GTK, GTKAgg, GTKCairo, TkAgg , Wx or WxAgg这几个backend都要求有GUI图形界面的,所以在ssh操作的时候会报错.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值