当前位置:网站首页>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
边栏推荐
- 证券账户开户哪家的费率低 怎么办理开户最安全
- Buuctf:[wustctf2020] plain
- FS7022方案系列FS4059A双节两节锂电池串联充电IC和保护IC
- ASP. NET CORE Study06
- arcgis pro 可以实现直连postgresql,编辑图层要素吗
- The white paper on the panorama of the digital economy and the digitalization of consumer finance were released
- 《天天数学》连载53:二月二十二日
- plt.savefig()的用法以及保存路径
- 数字孪生能源系统,打造低碳时代“透视”眼
- Mysql database literacy, do you really know what a database is
猜你喜欢

SHAREit實力出眾,登陸全球 IAP 實力榜 Top7

PHP抓取网页获取特定信息

4年用户数破亿,孙哥带领波场再创新高

From jsonpath and XPath to spl

【MySQL从入门到精通】【高级篇】(三)MySQL用户的创建_修改_删除以及密码的设置

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

Flink流处理API大合集:掌握所有flink流处理技术,看这一篇就够了

fastposter v2.8.4 发布 电商海报生成器

FH511+TP4333组成一个户外移动电源照明野营灯方案。

Watermaker of the Flink core
随机推荐
深入理解贝叶斯定理
Microservice stability guarantee
Copying open source for basic software is not advisable. Self reliance is the right way
Performance test-01-introduction
Go语学习笔记 - gorm使用 - 数据库配置、表新增 | Web框架Gin(七)
Stm32f1 and stm32cubeide programming example - matrix keyboard driver
Watermaker of the Flink core
895. 最长上升子序列
从pdb源码到frame帧对象
Online JSON to plaintext tool
flink核心之watermarker
中二青年付杰的逆袭故事:从二本生到 ICLR 杰出论文奖,我用了20年
The Research Report of Analysys' 2022 China Banking privacy computing platform supplier strength matrix analysis' was officially launched
align-items 与 align-content 的区别
Manjaro easyconnecy error: libgtk-x11-2.0 so. 0: cannot open shared object file: No such file or directory
Wi-Fi 7 来啦,它到底有多强?
You must configure either the server or JDBC driver (via the ‘serverTimezone‘ configuration property
Centos7: switch MySQL users and log in to MySQL
2. 01背包问题
From jsonpath and XPath to spl