当前位置:网站首页>Pytorch read / write file
Pytorch read / write file
2022-06-29 04:03:00 【Smoked Luoting purple Pavilion】
Writing documents
torch.save()
import torch
from torch import nn
from torch.nn import functional as F
x= torch.arange(4)
torch.save(x, "x-file") # The program will automatically x Write to x-file In file , If you start x-file File does not exist , The system will automatically create the file name Reading documents
torch.load()
import torch
from torch import nn
from torch.nn import functional as F
x= torch.arange(4)
torch.save(x, "x-file")
print(x)
x2 = torch.load("x-file") # Read the file
print(x2)边栏推荐
- 要不是和阿里P7聊过,我也不知道自己是个棒槌
- 自己动手搭建一个简单的网站
- 女程序员晒出5月的工资条:工资是高,但是真累,网友评论炸锅了
- Nuxt - 每个页面单独设置 SEO 相关标签及网页标题、图标等(页面配置 head)
- MobileOne: 移动端仅需1ms的高性能骨干
- 不使用union实现Mysql 列转行
- 88. (cesium chapter) cesium aggregation diagram
- Ling Jing thinks about her own way
- Libuv库概述及libevent、libev、libuv对比(转载)
- Data collection and management [8]
猜你喜欢
![[tcapulusdb knowledge base] batch copy the game area](/img/c8/1985e4a9df7c9aae81b42c1996ca99.png)
[tcapulusdb knowledge base] batch copy the game area

What is the dry goods microservice architecture? What are the advantages and disadvantages?

moudo网络库剖析

Go implements distributed locks

Preliminary construction of SSM project environment

【滤波器设计】根据设计指标使用matlab定制滤波器

MySQL review materials (additional) case when

High performance current limiter guava ratelimiter

基于可变参模板实现的线程池

Seekbar custom pictures are not displayed completely up, down, left, right / bitmaptodrawable / bitmaptodrawable inter rotation / paddingstart/paddingend /thumboffset
随机推荐
Influence of air resistance on the trajectory of table tennis
Go implements distributed locks
NotImplementedError: Could not run torchvision::nms
Do you feel confused when you study at three in the morning?
Whose encryption key is written in the code? (that's you)
Nuxt - 每个页面单独设置 SEO 相关标签及网页标题、图标等(页面配置 head)
Data statistical analysis (SPSS) [4]
在命令行登录mysql数据库以及查看版本号
How to merge upstream and downstream SQL data records
SQL two columns become multi row filter display
String不同创建方式的区别
Qtableview gets all currently selected cells
大神们 在富函数的open中从mysql连接池里取连接 连接池初始化是20个 如果富函数的并行度是1
MySQL复习资料(附加)case when
Zhai Jia: from technical engineer to open source entrepreneur of "net red"
要不是和阿里P7聊过,我也不知道自己是个棒槌
An annotation elegant implementation of interface data desensitization
How to back up all data on Apple mobile phone in 2 steps (free)
MobileOne: 移动端仅需1ms的高性能骨干
87. (cesium chapter) cesium thermal map (pasted with terrain)