五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【PyTorch】Tensor&Variable

2022-09-09 22:33 作者:安然Nano  | 我要投稿

從重新過一遍PyTorch,記錄會稍晚同步到blog.qhpersonal.top

Initializing a Tensor

Attribute of Tensor

Three attributs is stored: shap, datatype, the device

Tensor and Numpy Conversions

numpy() : Tensor --> Numpy

torch.from_numpy(): Numpy --> Tensor

Operation on Tensor

tensor.to("cuda"): To GPU

cat(): Connect

stack(): Superposition. And stack make the dim up one.

Arithmetic Operations

Multiplication

matrix: tenser @ tensor, tensor.matmul() ? ?// tensor.mm() only use two matrix mul

element-wise product: tensor * tensor, torch.mul()

Others

tensor.sum(): Sum by the specified dim

.item(): single-element tensors --> python numerical value

tensor.add_(): add ? and store the result

參考資料:

[1]Welcome?to?PyTorch Tutorials[EB/OL]. (2022-09-09)[2022-09-09]. https://pytorch.org/tutorials.


【PyTorch】Tensor&Variable的評論 (共 條)

分享到微博請遵守國家法律
秦皇岛市| 托里县| 缙云县| 普宁市| 雷州市| 射阳县| 宁河县| 略阳县| 罗定市| 龙游县| 青岛市| 道孚县| 亳州市| 天镇县| 永宁县| 平谷区| 石渠县| 福清市| 罗田县| 长沙县| 山阳县| 高阳县| 武安市| 平潭县| 神池县| 汝城县| 牡丹江市| 乌鲁木齐市| 民乐县| 红河县| 全椒县| 桐乡市| 固原市| 准格尔旗| 洛宁县| 东丰县| 健康| 喀喇沁旗| 邮箱| 岢岚县| 土默特右旗|