赞
踩
- # pip install numpy==1.20 -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
- # Keras 2.3.1 TensorFlow2.4.1 numpy>=1.20 protobuf==3.20.1 python3.8
-
- import tensorflow as tf
- # pip install numpy==1.20 -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
- # Keras 2.3.1 TensorFlow2.4.1 numpy>=1.20 protobuf==3.20.1 python3.8
- from tensorflow import keras
- from tensorflow.keras import layers,models
- import pathlib
- import keras
- import matplotlib.pyplot as plt
- import numpy as np
- import os
- import PIL
-
- print(keras.__version__)
- print(tf.__version__)
- data_dir = "flower_photos"
- data_dir = pathlib.Path(data_dir)
-
- image_count = len(list(data_dir.glob('*/*.jpg')))
-
- print("图片总数为:",image_count)
-
- roses = list(data_dir.glob('roses/*'))
- im=PIL.Image.open(str(roses[0]))
- im.sho
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。