projects
/
pytorch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93ce0d3
)
OCD update.
author
Francois Fleuret
<francois@fleuret.org>
Wed, 18 Dec 2019 16:24:04 +0000
(17:24 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Wed, 18 Dec 2019 16:24:04 +0000
(17:24 +0100)
denoising-ae-field.py
patch
|
blob
|
history
diff --git
a/denoising-ae-field.py
b/denoising-ae-field.py
index
67d2415
..
cc4af81
100755
(executable)
--- a/
denoising-ae-field.py
+++ b/
denoising-ae-field.py
@@
-13,7
+13,7
@@
model = nn.Sequential(
nn.Linear(100, 2)
)
nn.Linear(100, 2)
)
-############################################################
+############################################################
##########
def data_zigzag(nb):
a = torch.empty(nb).uniform_(0, 1).view(-1, 1)
def data_zigzag(nb):
a = torch.empty(nb).uniform_(0, 1).view(-1, 1)
@@
-80,12
+80,17
@@
ax.set_xlim(-1.6, 1.6)
ax.set_ylim(-1.6, 1.6)
ax.set_aspect(1)
ax.set_ylim(-1.6, 1.6)
ax.set_aspect(1)
-plot_field = ax.quiver(origins[:, 0].numpy(), origins[:, 1].numpy(),
- field[:, 0].numpy(), field[:, 1].numpy(),
- units = 'xy', scale = 1,
- width = 3e-3, headwidth = 25, headlength = 25)
+plot_field = ax.quiver(
+ origins[:, 0].numpy(), origins[:, 1].numpy(),
+ field[:, 0].numpy(), field[:, 1].numpy(),
+ units = 'xy', scale = 1,
+ width = 3e-3, headwidth = 25, headlength = 25
+)
-plot_data = ax.scatter(data[:, 0].numpy(), data[:, 1].numpy(), s = 1, color = 'tab:blue')
+plot_data = ax.scatter(
+ data[:, 0].numpy(), data[:, 1].numpy(),
+ s = 1, color = 'tab:blue'
+)
fig.savefig('denoising_field.pdf', bbox_inches='tight')
fig.savefig('denoising_field.pdf', bbox_inches='tight')