Richardzhangxx/AMR-Benchmark

很抱歉打扰作者,我有一些疑问,我运行代码最后一直报错不知道是什么原因造成的,报错结果如下,恳请作者可以答疑,十分感谢

ABUqqs opened this issue · 1 comments

Traceback (most recent call last):
File "D:/axinhaotiaozhi/AMR-Benchmark-main/RML201610a/1DCNN-PF/main.py", line 72, in
mltools.show_history(history)
File "D:\axinhaotiaozhi\AMR-Benchmark-main\RML201610a\1DCNN-PF\mltools.py", line 14, in show_history
plt.savefig('figure/total_loss.png')
File "D:\anaconda\envs\tf\lib\site-packages\matplotlib\pyplot.py", line 859, in savefig
res = fig.savefig(*args, **kwargs)
File "D:\anaconda\envs\tf\lib\site-packages\matplotlib\figure.py", line 2311, in savefig
self.canvas.print_figure(fname, **kwargs)
File "D:\anaconda\envs\tf\lib\site-packages\matplotlib\backend_bases.py", line 2217, in print_figure
**kwargs)
File "D:\anaconda\envs\tf\lib\site-packages\matplotlib\backend_bases.py", line 1639, in wrapper
return func(*args, **kwargs)
File "D:\anaconda\envs\tf\lib\site-packages\matplotlib\backends\backend_agg.py", line 512, in print_png
dpi=self.figure.dpi, metadata=metadata, pil_kwargs=pil_kwargs)
File "D:\anaconda\envs\tf\lib\site-packages\matplotlib\image.py", line 1611, in imsave
image.save(fname, **pil_kwargs)
File "D:\anaconda\envs\tf\lib\site-packages\PIL\Image.py", line 2237, in save
fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: 'figure/total_loss.png'

它报了一个文件未找到的错误,应该首先在当前工程的目录下建一个名为figure的文件夹