Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in file save_output #4

Open
dadamsncsa opened this issue Jul 25, 2019 · 1 comment
Open

bug in file save_output #4

dadamsncsa opened this issue Jul 25, 2019 · 1 comment

Comments

@dadamsncsa
Copy link
Member

epoch: 0 (35/36), ['loss', 'acc']: [0.6927258, 0.70576286]
Traceback (most recent call last):
  File "/home/dadams2/.conda/envs/unet/lib/python3.5/site-packages/PIL/BmpImagePlugin.py", line 231, in _save
    rawmode, bits, colors = SAVE[im.mode]
KeyError: 'F'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 33, in <module>
    run.train()
  File "/local/6081513/unet-sem/master_adb1e74_07-24-2019-14:00:15/unet-sem-6081513/model.py", line 133, in train
    save_output(out_imgs[0,...],out_masks[0,...],prediction[0,...],index=i,epoch=epoch)
  File "/local/6081513/unet-sem/master_adb1e74_07-24-2019-14:00:15/unet-sem-6081513/utils.py", line 12, in save_output
    print_img.save(os.path.join(directory,'%d_epoch'%epoch,'%d_input_image.bmp'%index))
  File "/home/dadams2/.conda/envs/unet/lib/python3.5/site-packages/PIL/Image.py", line 1950, in save
    save_handler(self, fp, filename)
  File "/home/dadams2/.conda/envs/unet/lib/python3.5/site-packages/PIL/BmpImagePlugin.py", line 233, in _save
    raise IOError("cannot write mode %s as BMP" % im.mode)
OSError: cannot write mode F as BMP
@dadamsncsa
Copy link
Member Author

Traceback (most recent call last):
  File "/home/dadams2/.conda/envs/unet/lib/python3.5/site-packages/PIL/PngImagePlugin.py", line 726, in _save
    rawmode, mode = _OUTMODES[mode]
KeyError: 'F'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 33, in <module>
    run.train()
  File "/local/6084871/unet-sem/master_21d245a_07-25-2019-10:45:04/unet-sem-6084871/model.py", line 133, in train
    save_output(out_imgs[0,...],out_masks[0,...],prediction[0,...],index=i,epoch=epoch)
  File "/local/6084871/unet-sem/master_21d245a_07-25-2019-10:45:04/unet-sem-6084871/utils.py", line 12, in save_output
    print_img.save(os.path.join(directory,'%d_epoch'%epoch,'%d_input_image.png'%index))
  File "/home/dadams2/.conda/envs/unet/lib/python3.5/site-packages/PIL/Image.py", line 1950, in save
    save_handler(self, fp, filename)
  File "/home/dadams2/.conda/envs/unet/lib/python3.5/site-packages/PIL/PngImagePlugin.py", line 728, in _save
    raise IOError("cannot write mode %s as PNG" % mode)
OSError: cannot write mode F as PNG

@dadamsncsa dadamsncsa reopened this Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant