Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
beta-vae-normalizing-flows
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kaan Güney Keklikçi
beta-vae-normalizing-flows
Commits
f37e1a51
Commit
f37e1a51
authored
Aug 10, 2021
by
Kaan Güney Keklikçi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected typo
parent
78601497
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
33 deletions
+32
-33
planar_execute.ipynb
notebooks/planar_execute.ipynb
+22
-31
planar_execute.py
scripts/flows/planar/planar_execute.py
+10
-2
No files found.
notebooks/planar_execute.ipynb
View file @
f37e1a51
This diff is collapsed.
Click to expand it.
scripts/flows/planar/planar_execute.py
View file @
f37e1a51
...
@@ -62,6 +62,10 @@ def check_version():
...
@@ -62,6 +62,10 @@ def check_version():
print
(
f
'Tensorflow-probability version: {tfp.__version__}'
)
print
(
f
'Tensorflow-probability version: {tfp.__version__}'
)
print
(
f
'Keras version: {tf.keras.__version__}
\n
'
)
print
(
f
'Keras version: {tf.keras.__version__}
\n
'
)
# In[ ]:
def
main
():
def
main
():
""" load data """
""" load data """
...
@@ -95,7 +99,7 @@ def main():
...
@@ -95,7 +99,7 @@ def main():
batch_size
=
32
batch_size
=
32
dtype
=
np
.
float32
dtype
=
np
.
float32
layers
=
2
layers
=
8
dims
=
data
.
shape
[
1
]
dims
=
data
.
shape
[
1
]
# multivariate normal for base distribution
# multivariate normal for base distribution
base_dist
=
tfd
.
MultivariateNormalDiag
(
loc
=
tf
.
zeros
(
shape
=
dims
,
dtype
=
dtype
))
base_dist
=
tfd
.
MultivariateNormalDiag
(
loc
=
tf
.
zeros
(
shape
=
dims
,
dtype
=
dtype
))
...
@@ -108,7 +112,7 @@ def main():
...
@@ -108,7 +112,7 @@ def main():
bijectors
=
[]
bijectors
=
[]
for
i
in
range
(
0
,
layers
):
for
i
in
range
(
0
,
layers
):
bijectors
.
append
(
Planar
Flow
(
input_dimensions
=
dims
,
case
=
'density_estimation'
))
bijectors
.
append
(
Planar
(
input_dimensions
=
dims
,
case
=
'density_estimation'
))
bijector
=
tfb
.
Chain
(
bijectors
=
list
(
reversed
(
bijectors
)),
name
=
'chain_of_planar'
)
bijector
=
tfb
.
Chain
(
bijectors
=
list
(
reversed
(
bijectors
)),
name
=
'chain_of_planar'
)
planar_flow
=
tfd
.
TransformedDistribution
(
planar_flow
=
tfd
.
TransformedDistribution
(
distribution
=
base_dist
,
distribution
=
base_dist
,
...
@@ -134,3 +138,7 @@ def main():
...
@@ -134,3 +138,7 @@ def main():
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
()
main
()
Write
Preview
Markdown
is supported
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