三蹦子专题

造车先做三蹦子220101--机器学习字符(字母、和数字识别)的“小白鼠”与“果蝇”

“0”数字字符零 的图片(16*16点阵): #Letter23Digital23R231006d.pyimport torchimport torch.nn as nnimport torch.optim as optim #optimizer = optim.SGD(model.parameters(), lr=0.01)from PIL import Imagefr

造车先做三蹦子-之三:自制数据集(6x6数据集)230103

6*6的数据集制造、与识别: #6*6的数据集的制作、与识别、测试、输出等import torchimport torch.nn as nnimport torch.optim as optim# 定义模型class NeuralNet(nn.Module):def __init__(self, input_size, hidden_size, num_classes):super(N

造车先做三蹦子-之二:自制数据集(5x5数据集)230102

#Jupyter Notebook231001import torchimport torch.nn as nnimport torch.optim as optim# 定义模型class Net(nn.Module):def __init__(self):super(Net, self).__init__()self.fc1 = nn.Linear(25, 50)self.fc2

造车先做三蹦子220101--机器学习字符(字母、和数字识别)的“小白鼠”与“果蝇”

“0”数字字符零 的图片(16*16点阵): import torchimport torch.nn as nnimport torch.optim as optimfrom PIL import Image, ImageDraw, ImageFontfrom torchvision import transformsimport matplotlib.pyplot as