admin管理员组

文章数量:1642436

我关注this tensorflow assignment,第一个问题有个问题。我必须使用给定的代码加载和转储一些数据数据,但由于某些原因它不能工作。在

我第一次遇到这样的错误:

Could not find a format to read the specified file in mode 'i'

我通过安装libfreeimage-dev解决了这个问题,但是现在我有另一个错误Could not load bitmap "FILE_PATH/FILE_NAME.png": No known reason

我已经确认了文件的存在,它确实存在。

错误来自此函数:def load_letter(folder, min_num_images):

"""Load the data for a single letter label."""

image_files = os.listdir(folder)

dataset = np.ndarray(shape=(len(image_files), image_size, image_size), dtype=np.float32)

print(folder)

num_images = 0

for image in image_files:

image_file = os.path.join(folder, image)

try:

image_data = (imageio.imread(image_file).astype(float) - pixel_depth / 2) / pixel_depth

if image_data.shape != (image_si

本文标签: 位图加载原因PythonImageIo