输出层代码
Weights1 = tf.Variable(tf.random_normal([11, 4]))
biases1 = tf.Variable(tf.zeros([1, 4]) + 0.1)
Wx_plus_b1 = tf.matmul(l0, Weights1) + biases1
N1act = 2/(1+pow(math.e,-Wx_plus_b1[3]))-1
prediction = tf_spiky(N1act)
报错信息
raise ValueError(err.message)
ValueError: slice index 3 of dimension 0 out of bounds. for 'strided_slice' (op: 'StridedSlice') with input shapes: [1,4], [1], [1], [1] and with computed input tensors: input[1] = , input[2] = , input[3] = .