minor fixes and changes
This commit is contained in:
@@ -19,7 +19,7 @@ import time
|
|||||||
from matplotlib import pyplot as plt # noqa: F401
|
from matplotlib import pyplot as plt # noqa: F401
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import path_fix
|
import add_pypho # noqa: F401
|
||||||
import pypho
|
import pypho
|
||||||
|
|
||||||
default_config = f"""
|
default_config = f"""
|
||||||
@@ -497,18 +497,18 @@ def plot_eye_diagram(
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
path_fix.show_log()
|
add_pypho.show_log()
|
||||||
config = get_config()
|
config = get_config()
|
||||||
|
|
||||||
length_ranges = [1000, 10000]
|
# length_ranges = [1000, 10000]
|
||||||
length_scales = [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
# length_scales = [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
|
|
||||||
lengths = [
|
# lengths = [
|
||||||
length_scale * length_range
|
# length_scale * length_range
|
||||||
for length_range in length_ranges
|
# for length_range in length_ranges
|
||||||
for length_scale in length_scales
|
# for length_scale in length_scales
|
||||||
]
|
# ]
|
||||||
lengths.append(max(length_ranges)*10)
|
# lengths.append(max(length_ranges)*10)
|
||||||
|
|
||||||
# length_loop(config, lengths)
|
# length_loop(config, lengths)
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class PytorchSettings:
|
|||||||
summary_dir: str = ".runs"
|
summary_dir: str = ".runs"
|
||||||
write_every: int = 10
|
write_every: int = 10
|
||||||
head_symbols: int = 40
|
head_symbols: int = 40
|
||||||
eye_symbols: int = 1000
|
eye_symbols: int = 400
|
||||||
|
|
||||||
|
|
||||||
# model settings
|
# model settings
|
||||||
@@ -48,8 +48,11 @@ class ModelSettings:
|
|||||||
output_dim: int = 2
|
output_dim: int = 2
|
||||||
n_hidden_layers: tuple | int = 3
|
n_hidden_layers: tuple | int = 3
|
||||||
n_hidden_nodes: tuple | int = 8
|
n_hidden_nodes: tuple | int = 8
|
||||||
model_activation_func: tuple = "ModReLU"
|
model_activation_func: tuple | str = "ModReLU"
|
||||||
overrides: dict = field(default_factory=dict)
|
overrides: dict = field(default_factory=dict)
|
||||||
|
dropout_prob: float | None = None
|
||||||
|
model_layer_function: str | None = None
|
||||||
|
model_layer_parametrizations: list= field(default_factory=list)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ def _optional_suggest(
|
|||||||
type: str,
|
type: str,
|
||||||
log: bool = False,
|
log: bool = False,
|
||||||
step: int | float | None = None,
|
step: int | float | None = None,
|
||||||
add_user: bool = False,
|
add_user: bool = True,
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
multiply: float | int = 1,
|
multiply: float | int = 1,
|
||||||
set_new: bool = True,
|
set_new: bool = True,
|
||||||
@@ -96,7 +96,7 @@ def suggest_categorical_optional(
|
|||||||
trial: trial.Trial,
|
trial: trial.Trial,
|
||||||
name: str,
|
name: str,
|
||||||
choices_or_value: tuple[Any] | list[Any] | Any,
|
choices_or_value: tuple[Any] | list[Any] | Any,
|
||||||
add_user: bool = False,
|
add_user: bool = True,
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
set_new: bool = True,
|
set_new: bool = True,
|
||||||
):
|
):
|
||||||
@@ -129,7 +129,7 @@ def suggest_int_optional(
|
|||||||
range_or_value: tuple[int] | list[int] | int,
|
range_or_value: tuple[int] | list[int] | int,
|
||||||
step: int = 1,
|
step: int = 1,
|
||||||
log: bool = False,
|
log: bool = False,
|
||||||
add_user: bool = False,
|
add_user: bool = True,
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
multiply: int = 1,
|
multiply: int = 1,
|
||||||
set_new: bool = True,
|
set_new: bool = True,
|
||||||
@@ -174,7 +174,7 @@ def suggest_float_optional(
|
|||||||
range_or_value: tuple[float] | list[float] | float,
|
range_or_value: tuple[float] | list[float] | float,
|
||||||
step: float | None = None,
|
step: float | None = None,
|
||||||
log: bool = False,
|
log: bool = False,
|
||||||
add_user: bool = False,
|
add_user: bool = True,
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
multiply: float = 1,
|
multiply: float = 1,
|
||||||
set_new: bool = True,
|
set_new: bool = True,
|
||||||
@@ -222,7 +222,7 @@ def suggest_categorical_optional_wrapper(
|
|||||||
self: trial.Trial,
|
self: trial.Trial,
|
||||||
name: str,
|
name: str,
|
||||||
choices_or_value: tuple[Any] | list[Any] | Any,
|
choices_or_value: tuple[Any] | list[Any] | Any,
|
||||||
add_user: bool = False,
|
add_user: bool = True,
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
set_new: bool = True,
|
set_new: bool = True,
|
||||||
):
|
):
|
||||||
@@ -253,7 +253,7 @@ def suggest_int_optional_wrapper(
|
|||||||
range_or_value: tuple[int] | list[int] | int,
|
range_or_value: tuple[int] | list[int] | int,
|
||||||
step: int = 1,
|
step: int = 1,
|
||||||
log: bool = False,
|
log: bool = False,
|
||||||
add_user: bool = False,
|
add_user: bool = True,
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
multiply: int = 1,
|
multiply: int = 1,
|
||||||
set_new: bool = True,
|
set_new: bool = True,
|
||||||
@@ -295,7 +295,7 @@ def suggest_float_optional_wrapper(
|
|||||||
range_or_value: tuple[float] | list[float] | float,
|
range_or_value: tuple[float] | list[float] | float,
|
||||||
step: float | None = None,
|
step: float | None = None,
|
||||||
log: bool = False,
|
log: bool = False,
|
||||||
add_user: bool = False,
|
add_user: bool = True,
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
multiply: float = 1,
|
multiply: float = 1,
|
||||||
set_new: bool = True,
|
set_new: bool = True,
|
||||||
|
|||||||
Reference in New Issue
Block a user