【发布时间】:2015-07-21 21:36:04
【问题描述】:
我正在尝试将我的图像输入到此方法中,但是当我尝试绘制图像时,它完全变黑了。
我尝试只输入一张图像并输入整个 MNIST 数据集。 结果一样。
https://github.com/lisa-lab/pylearn2/blob/master/pylearn2/expr/preprocessing.py
if GCN is True:
trainingFolder = "../inputData/converted_training/GCN/"
testingFolder = "../inputData/converted_testing/GCN/"
img0 = (data[1,1:]).reshape((28,28)).astype('uint8')*255
im = Image.fromarray(img0)
im.show()
#GCN#
img_gcn = global_contrast_normalize(data)
img_gcn_1 = Image.fromarray(img_gcn[1,1:].reshape((28,28)).astype('uint8')*255)
img_gcn_1.show()
第二张图片 img_gcn_1 变黑了。
我做错了什么?
【问题讨论】:
标签: python global contrast pylearn