|
1 | 1 | """Neural net base class |
2 | 2 |
|
3 | 3 | This is the most flexible class, not making assumptions on the kind of |
4 | | -task being peformed. Subclass this to create more specialized and |
| 4 | +task being performed. Subclass this to create more specialized and |
5 | 5 | sklearn-conforming classes like NeuralNetClassifier. |
6 | 6 |
|
7 | 7 | """ |
@@ -144,7 +144,7 @@ class NeuralNet(BaseEstimator): |
144 | 144 | this if your data is not supported. You should generally pass the |
145 | 145 | uninitialized ``Dataset`` class and define additional arguments to |
146 | 146 | X and y by prefixing them with ``dataset__``. It is also possible |
147 | | - to pass an initialzed ``Dataset``, in which case no additional |
| 147 | + to pass an initialized ``Dataset``, in which case no additional |
148 | 148 | arguments may be passed. |
149 | 149 |
|
150 | 150 | train_split : None or callable (default=skorch.dataset.ValidSplit(5)) |
@@ -700,7 +700,7 @@ def initialize_history(self): |
700 | 700 | return self |
701 | 701 |
|
702 | 702 | def _format_reinit_msg(self, name, kwargs=None, triggered_directly=True): |
703 | | - """Returns a message that informs about re-initializing a compoment. |
| 703 | + """Returns a message that informs about re-initializing a component. |
704 | 704 |
|
705 | 705 | Sometimes, the module or optimizer need to be |
706 | 706 | re-initialized. Not only should the user receive a message |
@@ -1593,7 +1593,7 @@ def forward_iter(self, X, training=False, device='cpu'): |
1593 | 1593 |
|
1594 | 1594 | device : string (default='cpu') |
1595 | 1595 | The device to store each inference result on. |
1596 | | - This defaults to CPU memory since there is genereally |
| 1596 | + This defaults to CPU memory since there is generally |
1597 | 1597 | more memory available there. For performance reasons |
1598 | 1598 | this might be changed to a specific CUDA device, |
1599 | 1599 | e.g. 'cuda:0'. |
@@ -1641,7 +1641,7 @@ def forward(self, X, training=False, device='cpu'): |
1641 | 1641 |
|
1642 | 1642 | device : string (default='cpu') |
1643 | 1643 | The device to store each inference result on. |
1644 | | - This defaults to CPU memory since there is genereally |
| 1644 | + This defaults to CPU memory since there is generally |
1645 | 1645 | more memory available there. For performance reasons |
1646 | 1646 | this might be changed to a specific CUDA device, |
1647 | 1647 | e.g. 'cuda:0'. |
@@ -2350,7 +2350,7 @@ def _set_params_callback(self, **params): |
2350 | 2350 | if '__' not in name and name in names: |
2351 | 2351 | self._replace_callback(name, params.pop(key)) |
2352 | 2352 |
|
2353 | | - # 3. Step parameters and other initilisation arguments |
| 2353 | + # 3. Step parameters and other initialisation arguments |
2354 | 2354 | for key in params.copy(): |
2355 | 2355 | name = key[11:] |
2356 | 2356 | part0, part1 = name.split('__') |
@@ -2527,12 +2527,12 @@ def _check_settable_attr(self, name, attr): |
2527 | 2527 |
|
2528 | 2528 | """ |
2529 | 2529 | if (self.init_context_ is None) and isinstance(attr, torch.nn.Module): |
2530 | | - msg = ("Trying to set torch compoment '{}' outside of an initialize method." |
| 2530 | + msg = ("Trying to set torch component '{}' outside of an initialize method." |
2531 | 2531 | " Consider defining it inside 'initialize_module'".format(name)) |
2532 | 2532 | raise SkorchAttributeError(msg) |
2533 | 2533 |
|
2534 | 2534 | if (self.init_context_ is None) and isinstance(attr, torch.optim.Optimizer): |
2535 | | - msg = ("Trying to set torch compoment '{}' outside of an initialize method." |
| 2535 | + msg = ("Trying to set torch component '{}' outside of an initialize method." |
2536 | 2536 | " Consider defining it inside 'initialize_optimizer'".format(name)) |
2537 | 2537 | raise SkorchAttributeError(msg) |
2538 | 2538 |
|
|
0 commit comments