Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
68e6e171
Commit
68e6e171
authored
Jun 25, 2020
by
lucas_miranda
Browse files
Implemented weight saving callback in model_training.py
parent
8707c174
Changes
1
Hide whitespace changes
Inline
Side-by-side
visualizations/train_viz_data_generator.py
View file @
68e6e171
...
...
@@ -6,7 +6,6 @@ import sys
sys
.
path
.
insert
(
1
,
"../"
)
from
copy
import
deepcopy
from
sklearn.decomposition
import
PCA
from
sklearn.discriminant_analysis
import
LinearDiscriminantAnalysis
from
sklearn.metrics
import
mean_absolute_error
from
source.preprocess
import
*
...
...
@@ -302,7 +301,7 @@ for checkpoint in tqdm(checkpoints):
reconstructions
.
append
(
ae
.
predict
(
pttest
))
print
(
"Done!"
)
print
([
i
.
shape
for
i
in
predictions
])
print
(
"Reducing latent space to 2 dimensions for dataviz..."
)
reducer
=
LinearDiscriminantAnalysis
(
n_components
=
2
)
encs
=
[]
...
...
@@ -314,6 +313,8 @@ for i in range(len(checkpoints) + 1):
if
variational
else
np
.
zeros
(
samples
)
)
print
(
predictions
[
i
].
shape
)
print
(
np
.
array
(
clusts
).
shape
)
encs
.
append
(
reducer
.
fit_transform
(
predictions
[
i
],
clusts
))
else
:
encs
.
append
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment