mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-25 10:32:59 +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.colorbar()
|
||||||
plt.savefig(filepath, dpi=200)
|
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):
|
def plot_predictions(filepath, input_items, colormap, model):
|
||||||
i = 0
|
i = 0
|
||||||
|
@ -327,6 +332,11 @@ def plot_predictions(filepath, input_items, colormap, model):
|
||||||
prediction_colormap
|
prediction_colormap
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
save_samples(
|
||||||
|
filepath.replace("_$$", "").replace(".png", ".jsonl"),
|
||||||
|
prediction_mask
|
||||||
|
)
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
def get_from_batched(dataset, count):
|
def get_from_batched(dataset, count):
|
||||||
|
|
Loading…
Reference in a new issue