![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
sheepcyyc
这个作者很懒,什么都没留下…
展开
-
matplotlib subplot 子图行间距太大
可以看一下是否没有创建figure,并为之设置figsize大小。 images_test = (images_test + 1.0) / 2.0 for n in range(num_clusters): #origal pylab.subplot(2, num_clusters, n+1) pylab.imshow(images_test[n*num_plots_per_cluster].reshape((image_width, image_height)), inte原创 2021-01-22 19:14:36 · 3640 阅读 · 1 评论 -
Chainer TypeError: Image data of dtype object cannot be converted to float
网上一堆说看看路径什么的,感觉都在瞎扯淡。可以试着type() 一下自己要imshow的变量,看看是不是数据类型不对应。自己type了一下,结果发现自己要保存的变量压根就不是numpy的数组,而是chainer.Variable.variable的数据类型,使用该数据类型的data属性获得numpy数组。 with chainer.no_backprop_mode() and chainer.using_config("train", False): y_onehot, z = mode原创 2021-01-22 19:08:42 · 5213 阅读 · 0 评论