mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-21 17:03:00 +00:00
dlr: write raw outputs to jsonl file
This commit is contained in:
parent
d24381babb
commit
5fdf229d06
1 changed files with 10 additions and 0 deletions
|
@ -305,6 +305,11 @@ def plot_samples_matplotlib(filepath, display_list):
|
|||
plt.colorbar()
|
||||
plt.savefig(filepath, dpi=200)
|
||||
|
||||
def save_samples(filepath, save_list):
|
||||
handle = io.open(filepath, "a")
|
||||
json.dump(save_list, handle)
|
||||
handle.write("\n")
|
||||
handle.close()
|
||||
|
||||
def plot_predictions(filepath, input_items, colormap, model):
|
||||
i = 0
|
||||
|
@ -327,6 +332,11 @@ def plot_predictions(filepath, input_items, colormap, model):
|
|||
prediction_colormap
|
||||
]
|
||||
)
|
||||
|
||||
save_samples(
|
||||
filepath.replace("_$$", "").replace(".png", ".jsonl"),
|
||||
prediction_mask
|
||||
)
|
||||
i += 1
|
||||
|
||||
def get_from_batched(dataset, count):
|
||||
|
|
Loading…
Reference in a new issue