theano - print value of TensorVariable

后端 未结 5 2012
夕颜
夕颜 2020-12-29 19:02

How can I print the numerical value of a theano TensorVariable? I\'m new to theano, so please be patient :)

I have a function where I get y

5条回答
  •  甜味超标
    2020-12-29 19:16

    I found @zuuz 's answer is pretty helpful, for values,

    print(your_variable.tag.test_value)
    

    for shapes it should be updated as,

    print(np.shape(your_variable.tag.test_value))
    

提交回复
热议问题