深度学习第一章-LeNet搭建
基于PyTorch框架,本模型存放于目录:
E:\python文件\deep-learning-for-image-processing-master\pytorch_classification\Test1_official_demo
经卷积后的矩阵尺寸大小计算公式为:
N=(W-F+2P)/S+1
- 输入图片大小W×W
- Filter大小FXF
- 步长S
- padding的像素数P
1
2
3
4
5
6
7 import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision.transforms as transforms
from PIL import Image