最近在学习pytorch,手工复现了LeNet网络,并附源码如下,欢迎大家留言交流
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
class LeNet(nn.Module):
def __init__(self):
super(LeNet,self).__init__()
self.conv1 = nn.Conv2d(1
2021-12-19 14:45:38
31KB
c
IS
le
1