Skip to content
Snippets Groups Projects
Verified Commit 311a7d73 authored by Björn Ludwig's avatar Björn Ludwig
Browse files

refactor(propagate): replace list input by tuple

parent be8c415a
No related branches found
No related tags found
No related merge requests found
...@@ -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 generation""" """Construct network architecture with desired depth and output neurons"""
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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment