当前位置:网站首页>plt. Usage of savefig() and save path
plt. Usage of savefig() and save path
2022-06-28 13:05:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
Sometimes images can meet people's visual needs better than data
pytorch There are many ways to save images under , But these are basically based on image processing , Assign a certain dimension to the pixels of the image , See the following blog for details :
Pytorch How to save pictures in _ Make the future -CSDN Blog _pytorch Save the picture
It is mainly to write some functions to save pictures ;
in addition ,pytorch There are many statements that can directly save pictures
Such as
save_image(fake_images, './img/fake_images-{}.png'.format(epoch + 1))This statement also needs to convert pixels .
So if
I just need to open a window , Observe the changes of images during training , I have no need for image pixel saving , Just save a window , So the function that I need to save the image is just a
plt.savefigplt.savefig And the path to save , And will not be covered during training , Can be on the code for your reference
if epoch % 10== 0:
plt.title('ber:{:.3f},a: {:.3f},b:{:.3f},snr: {:.3f}'.format(
error_rate, a, b,M
))
plt.plot(r3) # Draw the waveform
# save_image(r3, './img/fake_images-{}.png'.format(epoch + 1))
# print(type(r3))
# plt.draw()
plt.draw()
plt.savefig('./img/pic-{}.png'.format(epoch + 1))
plt.pause(1)
plt.close(fig1)Be accomplished , You can see the saved pictures
It is already in my save path .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/150676.html Link to the original text :https://javaforall.cn
边栏推荐
- The Research Report of Analysys' 2022 China Banking privacy computing platform supplier strength matrix analysis' was officially launched
- ##测试bug常用“Redmine”
- Manjaro easyconnecy error: libgtk-x11-2.0 so. 0: cannot open shared object file: No such file or directory
- $100000 AI competition: the task of finding "worse" big models
- 腾讯确认QQ大规模盗号,iPhone14无缘Type-C,第四大运营商5G正式放号,今日更多大新闻在此...
- Copying open source for basic software is not advisable. Self reliance is the right way
- I²C、SMBus、PMBus关系
- Shareit a une force exceptionnelle et se connecte au top 7 de la liste mondiale des forces IAP
- SHAREit实力出众,登陆全球 IAP 实力榜 Top7
- async-validator. JS data verifier
猜你喜欢
![[MySQL from introduction to mastery] [advanced part] (III) creation of MySQL users_ Modification_ Delete and password settings](/img/9c/2a0eb8f5ec03aebbe231dbdb388eca.png)
[MySQL from introduction to mastery] [advanced part] (III) creation of MySQL users_ Modification_ Delete and password settings

Tencent has confirmed that QQ has stolen numbers on a large scale, iphone14 has no chance of type-C, and 5g, the fourth largest operator, has officially released numbers. Today, more big news is here

深入理解贝叶斯定理

数字孪生能源系统,打造低碳时代“透视”眼

腾讯汤道生:面向数实融合新世界,开发者是最重要的“建筑师”

scratch旅行相册 电子学会图形化编程scratch等级考试一级真题和答案解析2022年6月

基础软件照搬开源不可取,自力更生才是正途

投资98万美元的Saas项目失败了

数启扬帆,智聚人才 | 腾讯云数据库 & CSDN 工程师能力轻量认证发布会重磅来袭!...

一款自动生成单元测试的 IDEA 插件,开发效率提升 70% 以上!
随机推荐
Centos7:切换mysql用户并登录mysql
k3s一键安装脚本
[today in history] June 28: musk was born; Microsoft launches office 365; The inventor of Chua's circuit was born
数启扬帆,智聚人才 | 腾讯云数据库 & CSDN 工程师能力轻量认证发布会重磅来袭!...
5A同步整流芯片 20V转12V2A/5V4.5A大电流 24W大功率同步整流芯片 大电流降压IC FS2462
Scratch travel photo album Electronic Society graphical programming scratch grade examination level 1 true questions and answers analysis June 2022
从 jsonpath 和 xpath 到 SPL
Digital twin energy system, creating a "perspective" in the low-carbon era
flink核心之watermarker
Finereport installation tutorial
Understand leveldb write operation
The $980000 SaaS project failed
You must configure either the server or JDBC driver (via the ‘serverTimezone‘ configuration property
STM32F1与STM32CubeIDE编程实例-矩阵键盘驱动
一文抄 10 篇!韩国发表的顶级会议论文被曝抄袭,第一作者是“原罪”?
Deep understanding of Bayes theorem
完全背包 初学篇「建议收藏」
嵌入式开发:估算电池寿命的7个技巧
ASP. NET CORE Study08
基于SSM实现水果蔬菜商城管理系统