Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Fidle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Talks
Fidle
Commits
f12565de
Commit
f12565de
authored
5 years ago
by
Jean-Luc Parouty Jean-Luc.Parouty@simap.grenoble-inp.fr
Browse files
Options
Downloads
Patches
Plain Diff
VAE MNIST is done :-)
Former-commit-id:
a1fc73a4
parent
6a719411
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
VAE/02-VAE-with-MNIST-post.ipynb
+38
-127
38 additions, 127 deletions
VAE/02-VAE-with-MNIST-post.ipynb
fidle/pwk.py
+10
-7
10 additions, 7 deletions
fidle/pwk.py
with
48 additions
and
134 deletions
VAE/02-VAE-with-MNIST-post.ipynb
+
38
−
127
View file @
f12565de
source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
fidle/pwk.py
+
10
−
7
View file @
f12565de
...
...
@@ -155,7 +155,7 @@ def rmin(l):
# show_images
# -------------------------------------------------------------
#
def
plot_images
(
x
,
y
=
None
,
indices
=
'
all
'
,
columns
=
12
,
x_size
=
1
,
y_size
=
1
,
colorbar
=
False
,
y_pred
=
None
,
cm
=
'
binary
'
):
def
plot_images
(
x
,
y
=
None
,
indices
=
'
all
'
,
columns
=
12
,
x_size
=
1
,
y_size
=
1
,
colorbar
=
False
,
y_pred
=
None
,
cm
=
'
binary
'
,
y_padding
=
0.35
,
spines_alpha
=
1
):
"""
Show some images in a grid, with legends
args:
...
...
@@ -170,14 +170,13 @@ def plot_images(x,y=None, indices='all', columns=12, x_size=1, y_size=1, colorba
returns:
nothing
"""
rows
=
math
.
ceil
(
len
(
indices
)
/
columns
)
fig
=
plt
.
figure
(
figsize
=
(
columns
*
x_size
,
rows
*
(
y_size
+
0.35
)))
n
=
1
errors
=
0
if
indices
==
'
all
'
:
indices
=
range
(
len
(
x
))
draw_labels
=
(
y
is
not
None
)
draw_pred
=
(
y_pred
is
not
None
)
if
indices
==
'
all
'
:
indices
=
range
(
len
(
x
))
rows
=
math
.
ceil
(
len
(
indices
)
/
columns
)
fig
=
plt
.
figure
(
figsize
=
(
columns
*
x_size
,
rows
*
(
y_size
+
y_padding
)))
n
=
1
errors
=
0
for
i
in
indices
:
axs
=
fig
.
add_subplot
(
rows
,
columns
,
n
)
n
+=
1
...
...
@@ -196,6 +195,10 @@ def plot_images(x,y=None, indices='all', columns=12, x_size=1, y_size=1, colorba
axs
.
spines
[
'
left
'
].
set_visible
(
True
)
axs
.
spines
[
'
top
'
].
set_visible
(
True
)
axs
.
spines
[
'
bottom
'
].
set_visible
(
True
)
axs
.
spines
[
'
right
'
].
set_alpha
(
spines_alpha
)
axs
.
spines
[
'
left
'
].
set_alpha
(
spines_alpha
)
axs
.
spines
[
'
top
'
].
set_alpha
(
spines_alpha
)
axs
.
spines
[
'
bottom
'
].
set_alpha
(
spines_alpha
)
axs
.
set_yticks
([])
axs
.
set_xticks
([])
if
draw_labels
and
not
draw_pred
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment