nn_keras_digits.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:python_utils 作者: Jayhello 项目源码 文件源码
def show_image():
    """
    this function is for a test to show, server image
    :return:
    """
    (X_train, y_train), (X_test, y_test) = load_data()
    # (X_train, y_train), (X_test, y_test) = mnist.load_data()
    # plot 4 images as gray scale
    plt.subplot(221)
    plt.imshow(X_train[0], cmap=plt.get_cmap('gray'))
    plt.subplot(222)
    plt.imshow(X_train[1], cmap=plt.get_cmap('gray'))
    plt.subplot(223)
    plt.imshow(X_train[2], cmap=plt.get_cmap('gray'))
    plt.subplot(224)
    plt.imshow(X_train[3], cmap=plt.get_cmap('gray'))
    # show the plot
    plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号