主页 返回 进入列表

  • 总根 >计算机与教育 >课程 >高等教育课程 >本科课程 >模式识别与人工智能 >ZSTU-(2020-2021)-1 >学生作业 >2018329621219费恩来

  • 作业8

    import tensorflow as tf
    import numpy as np
    def add_layer(inputs, in_size, out_size, activation_function=None):
    weight = tf.Variable(tf.random_normal([in_size, out_size]))
    biases = tf.Variable(tf.zeros([1, out_size]) + 0.1)
    wx_plus_b = tf.matmul(inputs, weight) + biases
    if activation_function is None:
    outputs = wx_plus_b
    else:
    outputs = activation_function(wx_plus_b)
    return outputs
    x_data = np.linspace(-1, 1, 300)[:, np.newaxis]
    noise = np.random.normal(0, 0.05, x_data.shape)
    y_data


    全文(Full Article): https://yvsou.com/dc/single.php?groupid=28.218.81608.81609.81613.85931.85932.83187.86157&pid=1338528&startgroup=