
代码以及文件路径问题
cool whidpers
越努力,越幸运
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python,os操作文件,文件路径
最近看到python的os模块,以及os,os.path的具体用法,有些不明白,在此记录一下。 概念:python获取文件的上一级目录:取文件所在目录的上一级目录 os.path.pardir:是父目录, os.path.abspath:是获取绝对路径 具体的举个例子看一下: 实验文件的真实绝路径为:D:\Python\test.py,现在运行test.py文件,python test.原创 2018-01-27 21:37:42 · 11859 阅读 · 1 评论 -
matpltlib 图片显示
今天通过一段代码来理解matpltlib的绘图功能,顺便复习一下小知识点 fig, axes = plt.subplots(nrows=2, ncols=10, sharex=True, sharey=True, figsize=(20,4)) in_imgs = mnist.test.images[10:20] noisy_imgs = in_imgs + noise_fact...原创 2018-05-08 15:51:17 · 585 阅读 · 0 评论