(path, is_grayscale = False)
| 32 | return (images + 1.) / 2. |
| 33 | |
| 34 | def imread(path, is_grayscale = False): |
| 35 | if (is_grayscale): |
| 36 | return io.imread(path).astype(np.float).flatten() |
| 37 | else: |
| 38 | return io.imread(path).astype(np.float) |
| 39 | |
| 40 | def imsave(images, size, path): |
| 41 | return io.imsave(path, merge(images, size)) |