深度学习------不同方法实现lenet-5模型

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

1. tensofflow通过sequence实现lenet-5

from tensorflow.keras.datasets import cifar10,fashion_mnist,mnist
import tensorflow as tf
import numpy as np
from tensorflow.keras.utils import 

猜你喜欢

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