I am working with TensorFlow in Python.
I read through the documentation of tf.random.truncated_normal that the input 'shape' gets 1-D tensor or python array, i.e. a vector (according to https://www.tensorflow.org/guide/tensors).
However, with the example I'm using, 'shape' is a 4-D tensor. Or is it considered a vector? Perhaps I have problem with the definition of vectors and tensors?
def weight_variable(shape, name = 'noname'):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial, name = name)
W_conv1 = weight_variable([5, 5, 3, 32], 'W_conv1')