From: Francois Fleuret Date: Thu, 19 Dec 2019 12:54:39 +0000 (+0100) Subject: OCD update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b9a3c65d7d1f534de76b49ddabca70c69773390;p=pytorch.git OCD update. --- diff --git a/denoising-ae-field.py b/denoising-ae-field.py index 8f748d1..2aa3648 100755 --- a/denoising-ae-field.py +++ b/denoising-ae-field.py @@ -61,7 +61,7 @@ def train_model(data): ###################################################################### -def save_image(data, data_name, model): +def save_image(data_name, model, data): a = torch.linspace(-1.5, 1.5, 30) x = a.view( 1, -1, 1).expand(a.size(0), a.size(0), 1) y = a.view(-1, 1, 1).expand(a.size(0), a.size(0), 1) @@ -104,4 +104,4 @@ for data_source in [ data_zigzag, data_spiral, data_penta ]: data, data_name = data_source(1000) data = data - data.mean(0) model = train_model(data) - save_image(data, data_name, model) + save_image(data_name, model, data)