【发布时间】:2020-07-09 00:26:53
【问题描述】:
我是神经网络的新手,一直在练习图像预处理。我正在尝试调整 numpy 数组形式的图像大小,这是我目前的方法:
# using tensorflow, resize the image
im = tf.image.resize(img_as_array, [299, 299])
# then use .eval() which returns a numpy array in the size I want
im_arr = im.eval(session=tf.compat.v1.Session())
有没有更好的方法来做到这一点?
【问题讨论】:
标签: numpy tensorflow image-preprocessing