exp函数

第一种是tensor用exp函数

th> a
 1  1  0
[torch.DoubleTensor of size 1x3]

                                                                      [0.0002s]
th> a:exp()
 2.7183  2.7183  1.0000
[torch.DoubleTensor of size 1x3]

 

th> a=1
                                                                      [0.0001s]
th> b=math.exp(a)
                                                                      [0.0001s]
th> b
2.718281828459    
                                                                      [0.0001s]
th> a=3
                                                                      [0.0001s]
th> b=math.exp(a)
                                                                      [0.0001s]
th> b
20.085536923188    

 

posted @ 2016-12-29 15:40  有梦就要去实现他  阅读(1217)  评论(0编辑  收藏  举报