Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Aug 13, 2024
1 parent bb0ddb5 commit 97fcb9d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion torchrl/modules/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from __future__ import annotations

import dataclasses
import warnings

from copy import deepcopy
from numbers import Number
Expand Down Expand Up @@ -179,8 +180,15 @@ def __init__(
if out_features is None:
raise ValueError("out_features must be specified for MLP.")

default_num_cells = 32
if num_cells is None:
warnings.warn(
"The current behaviour of MLP when not providing `num_cells` is that the number of cells is "
"set to [default_num_cells] * depth, where `depth=3` by default and `default_num_cells=0`. "
"From v0.7, this behaviour will switch and `depth=0` will be used. "
"To silence tis message, indicate what number of cells you desire.",
category=DeprecationWarning,
)
default_num_cells = 32
if depth is None:
num_cells = [default_num_cells] * 3
depth = 3
Expand Down

0 comments on commit 97fcb9d

Please sign in to comment.