当前位置:网站首页>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)边栏推荐
- 大神们 在富函数的open中从mysql连接池里取连接 连接池初始化是20个 如果富函数的并行度是1
- 树莓派用VNC Viewer方式远程连接
- Technology: how to design zkvm circuit
- 科班出身,结果外包都不要
- 点云地图导入gazebo思路
- Data collection and management [11]
- Seura 2 test code summary
- 基于xlsx的B+树索引实现
- Set hardware breakpoint instruction for ejtag under the PMON of the Godson development board
- Data collection and management [12]
猜你喜欢

Why are you a test / development programmer? Can you recall

87. (cesium chapter) cesium thermal map (pasted with terrain)

SQL two columns become multi row filter display

【C语言】 详解线程退出函数 pthread_exit

百度智能云服务网格产品CSM发布 | 火热公测中

New listing of operation light 3.0 -- a sincere work of self subversion across the times

Technology cloud report: side B of mixed office: how to have both security and efficiency?

leetcode - 295. Median data flow

How to back up all data on Apple mobile phone in 2 steps (free)

Mobileone: the mobile terminal only needs 1ms of high-performance backbone
随机推荐
logstash启动过慢甚至卡死
选对学校,专科也能进华为~早知道就好了
Libuv库概述及libevent、libev、libuv对比(转载)
Implementation of b+ tree index based on xlsx
Efficientnetv2 - get smaller models and faster training with NAS, scaling, and fused mbconv
Web crawler knowledge day04
sink端 一般都是jdbc的insert update delete么?
Data collection and management [15]
Data collection and management [8]
源代码防泄露技术种类浅析
Logstash starts too slowly or even gets stuck
【FPGA+sin】基于DDS(直接数字合成)的正弦信号发生器模块FPGA实现
科班出身,结果外包都不要
[data update] NPU development data based on 3568 development board is fully upgraded
Seura 2测试代码总结
Black screen and error reporting when loading custom models for gazebo with roslaunch
Tech Cloud Report: Mixed Office B side: How Safety and Efficiency can be combined?
高性能限流器 Guava RateLimiter
Distributed ID solution
CDC2.2.1还不支持postgresql14.1么?基于pgbouncer连接方式下,以5433