experimental_experiment.torch_bench._bash_bench_set_dummies¶
- class experimental_experiment.torch_bench._bash_bench_set_dummies.Neuron(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with one input.
- forward(x)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.Neuron16(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with 1 input in float16.
- forward(x)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.Neuron2Inputs(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with 2 inputs.
- forward(x, y)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.Neuron2Outputs(n_dims: int = 1000, n_targets: int = 100)[source]¶
Dummy module with 2 outputs.
- forward(x)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronIInt(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with an integer.
- forward(x, i_input)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronIList(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with a list as input.
- forward(x, yz)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronNamed1(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with named inputs.
- forward(input_x=None, input_y=None)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronNamed2(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with named inputs and none inputs.
- forward(input_x=None, input_y=None)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronNamedDict(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with as dictionary as input.
- forward(input_x=None, input_y=None)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronNoneInt(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with an empty input and an integer as input.
- forward(x, empty_input, i_input)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronNoneIntDefault(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with an optional integer and a list as inputs.
- forward(x, empty_input, i_input=10)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronNoneIntDict(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with an optional integer and dictionary as inputs.
- forward(x, empty_input=None, i_input=2)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronNoneListInt(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with a list and an integrer as inputs.
- forward(x, yz, i_input)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class experimental_experiment.torch_bench._bash_bench_set_dummies.NeuronTuple(n_dims: int = 5, n_targets: int = 3)[source]¶
Dummy module with a tuple as input.
- forward(x)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.