Beispiel #1
0
 def net_cls_2d(self):
     from skorch.toy import make_regressor
     return make_regressor(
         input_units=2,
         num_hidden=0,
         output_units=1,
     )
Beispiel #2
0
    def net_cls(self):
        """very simple network that trains for 10 epochs"""
        from skorch import NeuralNetRegressor
        from skorch.toy import make_regressor

        module_cls = make_regressor(
            input_units=1,
            num_hidden=0,
            output_units=1,
        )

        return partial(NeuralNetRegressor,
                       module=module_cls,
                       max_epochs=10,
                       batch_size=10)
 def multioutput_module_cls(self):
     from skorch.toy import make_regressor
     return make_regressor(output_units=3, dropout=0.5)
 def module_cls(self):
     from skorch.toy import make_regressor
     return make_regressor(dropout=0.5)
Beispiel #5
0
 def test_make_regressor(self):
     from skorch.toy import make_regressor
     module = make_regressor()()
     assert module.sequential[-1].out_features == 1