Tensorflow官网——迁移学习和微调部分解读
import matplotlib.pyplot as plt
import numpy as np
import os
import tensorflow as tf
#数据预处理
#数据下载
from tensorflow.keras.preprocessing import image_dataset_from_directory
_URL = 'https://storage.googleapis.com/mledu-datasets/cats_and_dogs_filtered.zip'
path_to_zip = tf.keras.utils.get_file('cats_and_dogs.zip', origin=_URL, extract=True)
PATH = os.path.join(os.path.dirname(path_to_zip), 'cats_and_dogs_filtered
共有 0 条评论