• 学习进度笔记23


    今天通过观看老师分享的TensorFlow教学视频,学习了构建卷积神经网络模型架构,首先是对参数进行定义和赋值:

    import tensorflow as tf
    import numpy as np
    import matplotlib.pyplot as plt
    from tensorflow.examples.tutorials.mnist import input_data

    mnist = input_data.read_data_sets('data/',one_hot=True)
    #print
    trainimg = mnist.train.images
    trainlabel = mnist.train.labels
    testimg = mnist.test.images
    testlabel = mnist.test.labels
    print("MNIST READY")
    n_input = 784
    n_output = 10
    weights = {
    'wc1': tf.Variable(tf.random_normal([3,3,1,64],stddev=0.1))
    'wc2': tf.Variable(tf.random_normal([3, 3, 64, 128], stddev=0.1))
    'wd1': tf.Variable(tf.random_normal([7*7*128,1024], stddev=0.1))
    'wd2': tf.Variable(tf.random_normal([1024,n_output], stddev=0.1))
    }
    biases = {
    'wc1': tf.Variable(tf.random_normal([64], stddev=0.1))
    'wc2': tf.Variable(tf.random_normal([128], stddev=0.1))
    'wd1': tf.Variable(tf.random_normal([1024], stddev=0.1))
    'wd2': tf.Variable(tf.random_normal([n_output], stddev=0.1))
    }
  • 相关阅读:
    iOS 十六进制字符串 "#FFFF00" 转换成颜色对象
    iOS toast 的连续显示
    文件管理
    pod 常用命令
    键盘事件
    iOS 添加阴影
    渐变色
    Ubuntu安装flameshot截图工具
    Ubuntu安装酸酸乳客户端
    Ubuntu安装网易云音乐
  • 原文地址:https://www.cnblogs.com/lijiawei1-2-3/p/14366381.html
Copyright © 2020-2023  润新知