File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 5
5
from __future__ import annotations
6
6
7
7
import dataclasses
8
- import warnings
9
8
10
9
from copy import deepcopy
11
10
from numbers import Number
@@ -51,6 +50,7 @@ class MLP(nn.Sequential):
51
50
argument (see below). If ``num_cells`` is an iterable and depth is
52
51
indicated, both should match: ``len(num_cells)`` must be equal to
53
52
``depth``.
53
+ Defaults to ``0`` (no depth - the network contains a single linear layer).
54
54
num_cells (int or sequence of int, optional): number of cells of every
55
55
layer in between the input and output. If an integer is provided,
56
56
every layer will have the same number of cells. If an iterable is provided,
@@ -181,17 +181,10 @@ def __init__(
181
181
raise ValueError ("out_features must be specified for MLP." )
182
182
183
183
if num_cells is None :
184
- warnings .warn (
185
- "The current behavior of MLP when not providing `num_cells` is that the number of cells is "
186
- "set to [default_num_cells] * depth, where `depth=3` by default and `default_num_cells=0`. "
187
- "From v0.7, this behavior will switch and `depth=0` will be used. "
188
- "To silence tis message, indicate what number of cells you desire." ,
189
- category = DeprecationWarning ,
190
- )
191
184
default_num_cells = 32
192
185
if depth is None :
193
- num_cells = [default_num_cells ] * 3
194
- depth = 3
186
+ num_cells = []
187
+ depth = 0
195
188
else :
196
189
num_cells = [default_num_cells ] * depth
197
190
You can’t perform that action at this time.
0 commit comments