当前位置:网站首页>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
边栏推荐
- 【历史上的今天】6 月 28 日:马斯克诞生;微软推出 Office 365;蔡氏电路的发明者出生
- 2. 01背包问题
- Mysql database literacy, do you really know what a database is
- 【MySQL从入门到精通】【高级篇】(三)MySQL用户的创建_修改_删除以及密码的设置
- Flink stream processing API collection: master all Flink stream processing technologies. Just read this article
- 基于SSM实现水果蔬菜商城管理系统
- The Research Report of Analysys' 2022 China Banking privacy computing platform supplier strength matrix analysis' was officially launched
- arcgis pro 可以实现直连postgresql,编辑图层要素吗
- In fact, there are a lot of MATLAB learning and use materials (many documents and videos) on the official website of MATLAB
- codeblocks mingw安装配置问题
猜你喜欢

From jsonpath and XPath to spl

腾讯确认QQ大规模盗号,iPhone14无缘Type-C,第四大运营商5G正式放号,今日更多大新闻在此...

【云原生】自助报表和BI能做这么多事?

##测试bug常用“Redmine”

Copying open source for basic software is not advisable. Self reliance is the right way

Mysql database literacy, do you really know what a database is

移动Web实训DAY-1

FS7022方案系列FS4059A双节两节锂电池串联充电IC和保护IC
![[cloud native] can self-service reports and Bi do so many things?](/img/80/2b797eb5875dc2b4c2876f2cb3d6f7.png)
[cloud native] can self-service reports and Bi do so many things?

Copy 10 for one article! The top conference papers published in South Korea were exposed to be plagiarized, and the first author was "original sin"?
随机推荐
##测试bug常用“Redmine”
centos6.5 php+mysql mysql库找不到
一文抄 10 篇!韩国发表的顶级会议论文被曝抄袭,第一作者是“原罪”?
电驴怎么显示服务器列表,(转)如何更新电驴服务器列表(eMule Server List)
哈希竞猜游戏系统开发技术成熟案例及源码
新品体验:阿里云新一代本地SSD实例i4开放公测
基础软件照搬开源不可取,自力更生才是正途
Scratch travel photo album Electronic Society graphical programming scratch grade examination level 1 true questions and answers analysis June 2022
pytorch模型调参、训练相关内容
[MySQL from introduction to mastery] [advanced part] (III) creation of MySQL users_ Modification_ Delete and password settings
Successful cases of rights protection of open source projects: successful rights protection of SPuG open source operation and maintenance platform
基于SSM实现水果蔬菜商城管理系统
ASP. NET CORE Study06
2. 01背包问题
June 28, 2022 Daily: Lecun's latest paper: the road to autonomous machine intelligence
Copy 10 for one article! The top conference papers published in South Korea were exposed to be plagiarized, and the first author was "original sin"?
async-validator. JS data verifier
Copying open source for basic software is not advisable. Self reliance is the right way
Shareit a une force exceptionnelle et se connecte au top 7 de la liste mondiale des forces IAP
Centos7 - installing mysql5.7