c语言sscanf函数的用法是什么
232
2022-09-21
theano T.col 实例
import theanoimport numpy as npimport theano.tensor as Tnumbers = theano.shared(np.float32([[1,2,3],[4,5,6],[7,8,9]]))numbers2 = T.col("temp_col",'float32')temp = numbers+numbers2train = theano.function(inputs=[numbers2],outputs=temp)print(train(np.float32([[1],[2],[3]])))
print结果: [[ 2. 3. 4.] [ 6. 7. 8.] [ 10. 11. 12.]]
import theanoimport numpy as npimport theano.tensor as Tnumbers = theano.shared(np.float32([[1,2,3],[4,5,6],[7,8,9]]))numbers2 = T.col("temp_col",'float32')temp = numbers*numbers2train = theano.function(inputs=[numbers2],outputs=temp)print(train(np.float32([[1],[2],[3]])))
print结果: [[ 1. 2. 3.] [ 8. 10. 12.] [ 21. 24. 27.]]
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~