# {py:mod}`evox.problems.neuroevolution.supervised_learning` ```{py:module} evox.problems.neuroevolution.supervised_learning ``` ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`SupervisedLearningProblem ` - ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem :summary: ``` ```` ### API `````{py:class} SupervisedLearningProblem(model: torch.nn.Module, data_loader: torch.utils.data.DataLoader, criterion: torch.nn.Module, n_batch_per_eval: int = 1, pop_size: int | None = None, device: torch.device | None = None, reduction: str = 'mean') :canonical: evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem Bases: {py:obj}`evox.core.Problem` ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem.__init__ ``` ````{py:method} _vmap_forward_pass(model_state: typing.Tuple[typing.Dict[str, torch.Tensor], typing.Dict[str, torch.Tensor]], data: typing.Tuple[torch.Tensor, torch.Tensor]) :canonical: evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._vmap_forward_pass ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._vmap_forward_pass ``` ```` ````{py:method} _forward_pass(model_state: typing.Tuple[typing.Dict[str, torch.Tensor], typing.Dict[str, torch.Tensor]], data: typing.Tuple[torch.Tensor, torch.Tensor]) :canonical: evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._forward_pass ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._forward_pass ``` ```` ````{py:method} _vmap_evaluate(pop_params: typing.Dict[str, torch.nn.Parameter]) :canonical: evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._vmap_evaluate ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._vmap_evaluate ``` ```` ````{py:method} _single_evaluate(params: typing.Dict[str, torch.nn.Parameter]) :canonical: evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._single_evaluate ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem._single_evaluate ``` ```` ````{py:method} evaluate(pop_params: typing.Dict[str, torch.nn.Parameter]) -> torch.Tensor :canonical: evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem.evaluate ```{autodoc2-docstring} evox.problems.neuroevolution.supervised_learning.SupervisedLearningProblem.evaluate ``` ```` `````