I wanted to initialize some of the variable on my network with numpy values. For the sake of the example consider:
init=np.random.rand(1,2)
tf.get_variable('var_name',initializer=init)
when I do that I get an error:
ValueError: Shape of a new variable (var_name) must be fully defined, but instead was <unknown>.
why is it that I am getting that error?
To try to fix it I tried doing:
tf.get_variable('var_name',initializer=init, shape=[1,2])
which yielded a even weirder error:
TypeError: 'numpy.ndarray' object is not callable
I tried reading the docs and examples but it didn't really help.
Is it not possible to initialize variables with numpy arrays with the get_variable method in TensorFlow?