小编Jan*_*err的帖子

Tensorboard Error'无法将AdamOptimizer转换为Tensor或Operation.'

我制作了一个DNN回归模型来预测我们在数据表中没有的结果,但我不能制作张量板.

此代码来自https://deeplearning4j.org/linear-regression.html 以及香港大学Sunghun Kim撰写的讲义.

    import tensorflow as tf
    import numpy as np
    tf.set_random_seed(777) #for reproducibility

    # data Import
    xy = np.loadtxt('Training_Data.csv', delimiter=',', dtype=np.float32)
    x_data = xy[:,0:-1]
    y_data = xy[:,[-1]]

    # Make sure the shape and data are OK
    print(x_data.shape, x_data)
    print(y_data.shape, y_data)

    # input place holders
    X = tf.placeholder(tf.float32, shape=[None, 2])
    Y = tf.placeholder(tf.float32, shape=[None, 1])

    # weight & bias for nn Layers

    W1 = tf.get_variable("W1", shape=[2, 512],initializer=tf.contrib.layers.xavier_initializer())
    b1 = tf.Variable(tf.random_normal([512]))
    L1 = tf.nn.relu(tf.matmul(X, W1) + b1)

    W2 = …
Run Code Online (Sandbox Code Playgroud)

python tensorflow tensorboard

3
推荐指数
2
解决办法
4853
查看次数

标签 统计

python ×1

tensorboard ×1

tensorflow ×1