目录
官方合作微信:gldz_super
数据由四种天气组成,分别是cloudy、rain、shine以及sunrise四种如下所示:
1.模块导入
import pathlib
import os, PIL
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.keras import regularizers
from tensorflow.keras import layers,models
import numpy as np
2.参数设置
# 参数设置
batch_size = 32
img_height = 224
img_width = 224
num_classes = 4
epochs = 30
3.查看GPU是否可用
gpus = tf.config.list_physical_devices("GPU")
if gpus:
gpu0 = gpus[0]
tf.confi