本项目利用Python深度学习库PyTorch实现经典的LeNet卷积神经网络,并通过MNIST手写数字数据集进行模型训练与效果验证。
最近在学习PyTorch,并手工复现了LeNet网络。以下是代码:
```python
import torch
import torch.nn as nn
import torch.nn.functional as F
class LeNet(nn.Module):
def __init__(self):
super(LeNet, self).__init__()
self.conv1 = nn.Conv2d(1,
```
欢迎各位留言交流。