代码位于keras的官方样例,并做了微量修改和大量学习?。
最终效果:
import keras
import numpy as np
import matplotlib.pyplot as plt
import random
from keras.callbacks import TensorBoard
from keras.datasets import mnist
from keras.models import Model
from keras.layers import Inpu
代码以及效果如下
import numpy as np
import random
import PIL.Image as image
import PIL.ImageDraw as draw
import PIL.ImageFont as imgfont
import PIL.ImageFilter as ifr
font = imgfont.truetype("C:/Windows/Fonts/CHARLEMAGNESTD-BOLD.OTF",60)#导入字体路径以及大小
w=240
h=9