paddlepaddle的手写体识别
import paddle
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import paddle.nn.functional as F
class MNIST(paddle.nn.Layer):
def __init__(self):
super(MNIST, self).__init__()
self.fc = paddle.nn.Linear(in_features=784, out_features=1)
def forward(self, inputs):
outputs = self.fc(inputs)
return outputs
model = MNIST()
def norm_img(img):
共有 0 条评论