Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GUM-compliant_neural-network_uncertainty-propagation
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
ludwig10_masters_thesis
GUM-compliant_neural-network_uncertainty-propagation
Commits
311a7d73
Verified
Commit
311a7d73
authored
2 years ago
by
Björn Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
refactor(propagate): replace list input by tuple
parent
be8c415a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pytorch_gum_uncertainty_propagation/examples/propagate.py
+4
-4
4 additions, 4 deletions
...pytorch_gum_uncertainty_propagation/examples/propagate.py
with
4 additions
and
4 deletions
src/pytorch_gum_uncertainty_propagation/examples/propagate.py
+
4
−
4
View file @
311a7d73
...
@@ -63,10 +63,10 @@ def assemble_pipeline(
...
@@ -63,10 +63,10 @@ def assemble_pipeline(
def
_construct_out_features_counts
(
def
_construct_out_features_counts
(
in_features
:
int
,
out_features
:
int
=
2
,
depth
:
int
=
1
in_features
:
int
,
out_features
:
int
=
2
,
depth
:
int
=
1
)
->
list
[
int
]:
)
->
tuple
[
int
,
...
]:
"""
Construct network architecture with desired depth
for parameter generati
on
"""
"""
Construct network architecture with desired depth
and output neur
on
s
"""
if
depth
==
1
:
if
depth
==
1
:
return
[
out_features
]
return
(
out_features
,)
assert
in_features
>
out_features
assert
in_features
>
out_features
assert
(
in_features
-
out_features
)
/
depth
>=
1.0
assert
(
in_features
-
out_features
)
/
depth
>=
1.0
partition
=
{
out_features
}
partition
=
{
out_features
}
...
@@ -75,7 +75,7 @@ def _construct_out_features_counts(
...
@@ -75,7 +75,7 @@ def _construct_out_features_counts(
partition
.
add
(
in_features
:
=
ceil
(
in_features
-
step
))
partition
.
add
(
in_features
:
=
ceil
(
in_features
-
step
))
assert
len
(
partition
)
==
depth
assert
len
(
partition
)
==
depth
assert
min
(
partition
)
==
out_features
assert
min
(
partition
)
==
out_features
return
list
(
sorted
(
partition
,
reverse
=
True
))
return
tuple
(
sorted
(
partition
,
reverse
=
True
))
def
iterate_over_activations_and_architectures
(
def
iterate_over_activations_and_architectures
(
...
...
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