当前位置:网站首页>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
边栏推荐
- [tomato assistant installation]
- 2327. 知道秘密的人数(递推)
- Lombok原理和同时使⽤@Data和@Builder 的坑
- POI add border
- Complete list of common functions of turtle module
- 颠覆你的认知?get和post请求的本质
- Introduction to hashtable
- Meet diverse needs: jetmade creates three one-stop development packages to help efficient development
- 查询mysql数据库中各表记录数大小
- Redis —— Redis In Action —— Redis 实战—— 实战篇一 —— 基于 Redis 的短信登录功能 —— Redis + Token 的共享 session 应用— 有代码
猜你喜欢
图应用详解
Overturn your cognition? The nature of get and post requests
Stable Huawei micro certification, stable Huawei cloud database service practice
Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
Yyds dry inventory automatic lighting system based on CC2530 (ZigBee)
Solve the compilation problem of "c2001: line breaks in constants"
Mlapi series - 04 - network variables and network serialization [network synchronization]
[Yu Yue education] reference materials of complex variable function and integral transformation of Northwestern Polytechnic University
The implementation of the maize negotiable digital warehouse receipt standard will speed up the asset digitization process of the industry
Figure application details
随机推荐
1291_ Add timestamp function in xshell log
Mysql database storage engine
Solution of storage bar code management system in food industry
How many of the 10 most common examples of istio traffic management do you know?
Overturn your cognition? The nature of get and post requests
Etcd database source code analysis -- etcdserver bootstrap initialization storage
Understanding of processes, threads, coroutines, synchronization, asynchrony, blocking, non blocking, concurrency, parallelism, and serialization
捷码赋能案例:专业培训、技术支撑,多措并举推动毕业生搭建智慧校园毕设系统
Figure application details
JVM garbage collector concept
About some basic DP -- those things about coins (the basic introduction of DP)
解决“C2001:常量中有换行符“编译问题
Implementation of knowledge consolidation source code 1: epoll implementation of TCP server
Implementation of knowledge consolidation source code 2: TCP server receives and processes half packets and sticky packets
Fedora/rehl installation semanage
2328. 网格图中递增路径的数目(记忆化搜索)
Can Flink SQL read multiple topics at the same time. How to write in with
[Chongqing Guangdong education] engineering fluid mechanics reference materials of southwestjiaotonguniversity
npm命令--安装依赖包--用法/详解
After learning classes and objects, I wrote a date class