深度学习------不同方法实现vgg16

本博客通过tensorflow实现vgg-16模型,对于vgg-16模型有不同的写法,包括,sequence模型、类封装、自定义函数,而本博客主要对这三种写法做主要介绍,代码和图如下:

在这里插入图片描述
该图图片大小为224x224x3通道的图片大小,本代码稍做修改,用32x32x3通道的图片为例,在卷积核和通道数不变的情况下训练的vgg-16模型。

1. tensofflow通过sequence实现vgg-16

from tensorflow.keras.datasets import cifar10
import tensorflow as tf
from tensorflow.keras import models,Sequential
from tensorflow.

猜你喜欢

转载自blog.csdn.net/m0_47405013/article/details/125405220