当前位置:网站首页>C'est un petit résumé de l'étude.
C'est un petit résumé de l'étude.
2022-07-06 04:33:00 【Cheng wahako】
#Le code suivant est dansjupyter notebookEn cours d'exécution
import torch
c=torch.arange(20).reshape(2,5,2)
c,c.sum(axis=0) #(2,5,2)Le premier2Disparaître,Deux.(5,2)Ajouter
#Résultats des opérations
(tensor([[[ 0, 1],
[ 2, 3],
[ 4, 5],
[ 6, 7],
[ 8, 9]],
[[10, 11],
[12, 13],
[14, 15],
[16, 17],
[18, 19]]]),
tensor([[10, 12],
[14, 16],
[18, 20],
[22, 24],
[26, 28]]))
c=torch.arange(20).reshape(2,5,2)
c,c.sum(axis=1) #(2,5,2)Deuxième5Disparaître,Deux.(5,2)Devenir(1,2)Ajouter
#Résultats des opérations
(tensor([[[ 0, 1],
[ 2, 3],
[ 4, 5],
[ 6, 7],
[ 8, 9]],
[[10, 11],
[12, 13],
[14, 15],
[16, 17],
[18, 19]]]),
tensor([[20, 25],
[70, 75]]))
c=torch.arange(20).reshape(2,5,2)
c,c.sum(axis=2) #(2,5,2)Troisième2Disparaître,Devenir(2,5)
#Résultats des opérations
(tensor([[[ 0, 1],
[ 2, 3],
[ 4, 5],
[ 6, 7],
[ 8, 9]],
[[10, 11],
[12, 13],
[14, 15],
[16, 17],
[18, 19]]]),
tensor([[ 1, 5, 9, 13, 17],
[21, 25, 29, 33, 37]]))
c=torch.arange(20).reshape(2,5,2)
c,c.sum(axis=1,keepdims=True).shape
#Exécution de la capture d'écran
(tensor([[[ 0, 1],
[ 2, 3],
[ 4, 5],
[ 6, 7],
[ 8, 9]],
[[10, 11],
[12, 13],
[14, 15],
[16, 17],
[18, 19]]]),
torch.Size([2, 1, 2]))
Pour un modèle de régression linéaire
1.Générer un ensemble de données.
2.Lire l'ensemble de données.
3.Paramètres du modèle d'initialisation.
4.Définir le modèle
5.Fonction de perte
6.Algorithme d'optimisation
7.Formation
边栏推荐
- Stable Huawei micro certification, stable Huawei cloud database service practice
- Implementation of knowledge consolidation source code 1: epoll implementation of TCP server
- MLAPI系列 - 04 - 网络变量和网络序列化【网络同步】
- 729. 我的日程安排表 I(set or 动态开点线段树)
- [tomato assistant installation]
- BOM - location, history, pop-up box, timing
- One question per day (Mathematics)
- Mixed development of QML and QWidget (preliminary exploration)
- P2102 地砖铺设(dfs&贪心)
- Easyrecovery reliable and toll free data recovery computer software
猜你喜欢

Database - MySQL storage engine (deadlock)

In depth MySQL transactions, stored procedures and triggers

解决“C2001:常量中有换行符“编译问题

canal同步mysql数据变化到kafka(centos部署)

VNCTF2022 WriteUp

Selection of slow motion function

ETCD数据库源码分析——etcdserver bootstrap初始化存储

题解:《单词覆盖还原》、《最长连号》、《小玉买文具》、《小玉家的电费》

Lora gateway Ethernet transmission
![[face recognition series] | realize automatic makeup](/img/a5/de98d0522b9dae809cd242aac305b3.jpg)
[face recognition series] | realize automatic makeup
随机推荐
Dry goods collection | Vulkan game engine video tutorial
Knowledge consolidation source code implementation 3: buffer ringbuffer
Solutions: word coverage restoration, longest serial number, Xiaoyu buys stationery, Xiaoyu's electricity bill
拉格朗日插值法
Stable Huawei micro certification, stable Huawei cloud database service practice
Yyds dry inventory automatic lighting system based on CC2530 (ZigBee)
Solve the compilation problem of "c2001: line breaks in constants"
Lagrange polynomial
CADD课程学习(8)-- 化合物库虚拟筛选(Virtual Screening)
【HBZ分享】ArrayList的增删慢查询快的原因
[Zhao Yuqiang] deploy kubernetes cluster with binary package
【HBZ分享】云数据库如何定位慢查询
Patent | subject classification method based on graph convolution neural network fusion of multiple human brain maps
Overturn your cognition? The nature of get and post requests
[tomato assistant installation]
MLAPI系列 - 04 - 网络变量和网络序列化【网络同步】
Basic explanation of turtle module - draw curve
C. The third problem
Crawler notes: improve data collection efficiency! Use of proxy pool and thread pool
Slow SQL fetching and analysis of MySQL database