projects
/
pytorch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72e4bc5
)
OCD update.
author
Francois Fleuret
<francois@fleuret.org>
Thu, 19 Dec 2019 12:54:39 +0000
(13:54 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Thu, 19 Dec 2019 12:54:39 +0000
(13:54 +0100)
denoising-ae-field.py
patch
|
blob
|
history
diff --git
a/denoising-ae-field.py
b/denoising-ae-field.py
index
8f748d1
..
2aa3648
100755
(executable)
--- 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
)