Python torch Module
This page shows the popular functions and classes defined in the
torch module.
The items are ordered by their popularity in 40,000 open source Python projects.
If you can not find a good example below, you can try
the search function
to search modules.
-
1. nn()Used in 2979 projects
-
2. load()Used in 2586 projects
-
3. save()Used in 2567 projects
-
4. cat()Used in 2567 projects
-
5. zeros()Used in 2032 projects
-
6. from_numpy()Used in 1962 projects
-
7. autograd()Used in 1865 projects
-
8. no_grad()Used in 1838 projects
-
9. Tensor()Used in 1767 projects
-
10. optim()Used in 1701 projects
-
11. manual_seed()Used in 1551 projects
-
12. FloatTensor()Used in 1544 projects
-
13. sum()Used in 1436 projects
-
14. device()Used in 1336 projects
-
15. ones()Used in 1326 projects
-
16. max()Used in 1319 projects
-
17. LongTensor()Used in 1285 projects
-
18. stack()Used in 1260 projects
-
19. tensor()Used in 1201 projects
-
20. mean()Used in 1047 projects
-
21. randn()Used in 1022 projects
-
22. exp()Used in 912 projects
-
23. arange()Used in 908 projects
-
24. log()Used in 852 projects
-
25. rand()Used in 801 projects
-
26. zeros_like()Used in 717 projects
-
27. sigmoid()Used in 705 projects
-
28. sqrt()Used in 703 projects
-
29. clamp()Used in 618 projects
-
30. matmul()Used in 593 projects
-
31. min()Used in 587 projects
-
32. long()Used in 564 projects
-
33. bmm()Used in 533 projects
-
34. abs()Used in 515 projects
-
35. pow()Used in 504 projects
-
36. float()Used in 482 projects
-
37. tanh()Used in 477 projects
-
38. float32()Used in 471 projects
-
39. ones_like()Used in 436 projects
-
40. sort()Used in 406 projects
-
41. norm()Used in 402 projects
-
42. eye()Used in 388 projects
-
43. is_tensor()Used in 377 projects
-
44. randperm()Used in 374 projects
-
45. mul()Used in 359 projects
-
46. mm()Used in 358 projects
-
47. unsqueeze()Used in 342 projects
-
48. ByteTensor()Used in 337 projects
-
49. Size()Used in 336 projects
-
50. transpose()Used in 316 projects
-
51. argmax()Used in 315 projects
-
52. cos()Used in 303 projects
-
53. gather()Used in 302 projects
-
54. index_select()Used in 288 projects
-
55. uint8()Used in 287 projects
-
56. topk()Used in 281 projects
-
57. empty()Used in 280 projects
-
58. sin()Used in 276 projects
-
59. split()Used in 262 projects
-
60. squeeze()Used in 255 projects
-
61. distributed()Used in 251 projects
-
62. where()Used in 243 projects
-
63. IntTensor()Used in 233 projects
-
64. __version__()Used in 223 projects
-
Used in 215 projects
-
66. nonzero()Used in 210 projects
-
Used in 210 projects
-
68. int64()Used in 208 projects
-
69. utils()Used in 205 projects
-
70. multinomial()Used in 205 projects
-
71. randint()Used in 204 projects
-
72. full()Used in 196 projects
-
73. div()Used in 195 projects
-
74. add()Used in 188 projects
-
75. chunk()Used in 174 projects
-
76. linspace()Used in 167 projects
-
77. diag()Used in 163 projects
-
78. floor()Used in 160 projects
-
79. isnan()Used in 150 projects
-
80. as_tensor()Used in 141 projects
-
81. softmax()Used in 134 projects
-
82. eq()Used in 132 projects
-
83. randn_like()Used in 130 projects
-
84. distributions()Used in 123 projects
-
85. DoubleTensor()Used in 122 projects
-
86. dot()Used in 118 projects
-
87. int32()Used in 114 projects
-
88. einsum()Used in 110 projects
-
89. bool()Used in 108 projects
-
90. meshgrid()Used in 108 projects
-
91. float64()Used in 107 projects
-
92. equal()Used in 103 projects
-
93. unique()Used in 103 projects
-
94. cumsum()Used in 101 projects
-
95. round()Used in 100 projects
-
Used in 99 projects
-
97. all()Used in 99 projects
-
98. sign()Used in 98 projects
-
Used in 96 projects
-
100. std()Used in 94 projects
-
101. allclose()Used in 94 projects
-
102. cuda()Used in 92 projects
-
103. int()Used in 87 projects
-
104. prod()Used in 86 projects
-
105. masked_select()Used in 85 projects
-
106. gt()Used in 83 projects
-
107. erf()Used in 83 projects
-
108. flip()Used in 82 projects
-
109. Generator()Used in 81 projects
-
110. relu()Used in 81 projects
-
111. full_like()Used in 79 projects
-
112. triu()Used in 78 projects
-
113. normal()Used in 78 projects
-
114. rand_like()Used in 75 projects
-
115. flatten()Used in 75 projects
-
116. tril()Used in 73 projects
-
117. unbind()Used in 72 projects
-
118. reshape()Used in 70 projects
-
119. empty_like()Used in 70 projects
-
120. float16()Used in 69 projects
-
121. bernoulli()Used in 68 projects
-
122. backends()Used in 64 projects
-
123. HalfTensor()Used in 64 projects
-
124. t()Used in 64 projects
-
125. atan2()Used in 64 projects
-
126. log2()Used in 63 projects
-
127. acos()Used in 61 projects
-
128. inverse()Used in 61 projects
-
129. enable_grad()Used in 61 projects
-
130. addmm()Used in 59 projects
-
131. dtype()Used in 59 projects
-
132. logsumexp()Used in 59 projects
-
133. ger()Used in 57 projects
-
134. double()Used in 57 projects
-
135. _six()Used in 55 projects
-
136. any()Used in 51 projects
-
137. ge()Used in 49 projects
-
138. isinf()Used in 48 projects
-
139. range()Used in 46 projects
-
140. half()Used in 46 projects
-
141. set_printoptions()Used in 46 projects
-
142. mv()Used in 45 projects
-
143. numel()Used in 44 projects
-
144. svd()Used in 43 projects
-
145. baddbmm()Used in 43 projects
-
146. is_grad_enabled()Used in 43 projects
-
147. var()Used in 41 projects
-
148. lt()Used in 41 projects
-
149. argsort()Used in 41 projects
-
150. log10()Used in 40 projects
-
151. atan()Used in 40 projects
-
152. log1p()Used in 38 projects
-
153. ShortTensor()Used in 37 projects
-
154. ne()Used in 37 projects
-
155. size()Used in 36 projects
-
156. _utils()Used in 36 projects
-
157. rsqrt()Used in 36 projects
-
158. ceil()Used in 36 projects
-
159. CharTensor()Used in 35 projects
-
160. int8()Used in 35 projects
-
161. set_rng_state()Used in 34 projects
-
162. le()Used in 34 projects
-
163. Tensors()Used in 33 projects
-
164. Variable()Used in 31 projects
-
165. isfinite()Used in 31 projects
-
166. median()Used in 30 projects
-
167. addcmul()Used in 30 projects
-
168. bincount()Used in 30 projects
-
169. log_softmax()Used in 30 projects
-
170. get_rng_state()Used in 29 projects
-
171. jit()Used in 29 projects
-
172. dist()Used in 29 projects
-
173. initial_seed()Used in 28 projects
-
174. cross()Used in 27 projects
-
175. int16()Used in 27 projects
-
176. onnx()Used in 26 projects
-
177. histc()Used in 25 projects
-
178. kthvalue()Used in 24 projects
-
179. det()Used in 24 projects
-
180. argmin()Used in 24 projects
-
181. symeig()Used in 23 projects
-
182. BoolTensor()Used in 22 projects
-
183. qr()Used in 21 projects
-
184. trace()Used in 21 projects
-
185. stft()Used in 20 projects
-
186. sparse_coo_tensor()Used in 20 projects
-
187. finfo()Used in 20 projects
-
188. remainder()Used in 19 projects
-
189. repeat_interleave()Used in 19 projects
-
190. reciprocal()Used in 19 projects
-
191. rfft()Used in 18 projects
-
192. set_default_dtype()Used in 18 projects
-
193. fmod()Used in 17 projects
-
194. hub()Used in 17 projects
-
195. sparse()Used in 16 projects
-
196. _CUsed in 16 projects
-
197. gesv()Used in 16 projects
-
198. isclose()Used in 16 projects
-
199. tan()Used in 16 projects
-
200. typename()Used in 15 projects
-
201. tensordot()Used in 15 projects
-
202. spmm()Used in 15 projects
-
203. hann_window()Used in 15 projects
-
204. neg()Used in 15 projects
-
205. cumprod()Used in 14 projects
-
206. logdet()Used in 14 projects
-
207. serialization()Used in 14 projects
-
208. fft()Used in 14 projects
-
209. tensors()Used in 14 projects
-
210. functional()Used in 13 projects
-
211. clone()Used in 13 projects
-
212. get_default_dtype()Used in 13 projects
-
213. cosh()Used in 13 projects
-
214. irfft()Used in 12 projects
-
215. diag_embed()Used in 12 projects
-
216. ifft()Used in 12 projects
-
217. sinh()Used in 12 projects
-
218. get_num_threads()Used in 12 projects
-
219. diagonal()Used in 12 projects
-
220. eig()Used in 11 projects
-
221. sub()Used in 11 projects
-
222. solve()Used in 10 projects
-
223. cdist()Used in 10 projects
-
224. rot90()Used in 10 projects
-
225. logspace()Used in 9 projects
-
226. asin()Used in 9 projects
-
227. slogdet()Used in 9 projects
-
228. testing()Used in 9 projects
-
229. conv2d()Used in 9 projects
-
230. Device()Used in 9 projects
-
231. legacy()Used in 9 projects
-
232. is_floating_point()Used in 9 projects
-
233. tril_indices()Used in 8 projects
-
234. ch()Used in 8 projects
-
235. randint_like()Used in 8 projects
-
236. hamming_window()Used in 8 projects
-
237. html()Used in 8 projects
-
238. cholesky()Used in 8 projects
-
239. clamp_min()Used in 8 projects
-
240. Storage()Used in 7 projects
-
241. gels()Used in 7 projects
-
242. roll()Used in 7 projects
-
243. lgamma()Used in 7 projects
-
244. take()Used in 7 projects
-
245. short()Used in 7 projects
-
246. broadcast_tensors()Used in 7 projects
-
247. trunc()Used in 6 projects
-
248. bfloat16()Used in 6 projects
-
249. narrow()Used in 6 projects
-
250. pinverse()Used in 6 projects
-
251. square()Used in 6 projects
-
252. potrf()Used in 5 projects
-
253. renorm()Used in 5 projects
-
254. cosine_similarity()Used in 5 projects
-
255. clamp_()Used in 5 projects
-
256. set_device()Used in 5 projects
-
257. blackman_window()Used in 5 projects
-
258. pairwise_distance()Used in 5 projects