import json | |
import numpy as np | |
from utils.isoutil import * | |
import sys | |
def load_params(config_file): | |
with open(config_file, 'r') as f: | |
data = json.load(f) | |
return data | |
def imshow(img): | |
npimg = img.numpy() | |
plt.figure(figsize = (30,30)) | |
plt.imshow(np.transpose(npimg, (1, 2, 0))) | |
plt.axis('off') | |
plt.show() | |
def write(text): | |
sys.stdout.write('\n' + text) | |
if hasattr(sys.stdout, 'flush'): | |
sys.stdout.flush() | |