You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with tf.variable_scope(scope) as scope:
w = tf.get_variable("weights", [x.shape[1], out_dim], initializer=tf.random_normal_initializer())
b = tf.get_variable("biases", [out_dim], initializer=tf.constant_initializer(0.0))
The following code will raise the error: TypeError: Failed to convert object of type <class 'list'> to Tensor. Contents: [Dimension(100), 50]. Consider casting elements to a supported type.
with tf.variable_scope(scope) as scope:
w = tf.get_variable(initializer=tf.random_normal([x.shape[1], out_dim]), name='weights')
b = tf.get_variable(initializer=tf.zeros([out_dim]), name='biases')
What's happened?
The text was updated successfully, but these errors were encountered:
The correct one:
The following code will raise the error:
TypeError: Failed to convert object of type <class 'list'> to Tensor. Contents: [Dimension(100), 50]. Consider casting elements to a supported type.
What's happened?
The text was updated successfully, but these errors were encountered: