Closed chnyutao closed 2 months ago
I agree, it's more a historical debt than anything meaningful. I will make a PR to progressively deprecate this. In the future, I can see two default behaviours for your example:
Thanks, I personally would prefer the former behavior (no depth implies depth=0
).
Describe the bug
When
depth
andnum_cells
are both not specified,MLP
will by default create a fully-connected neural network with three hidden layers, each with 32 neurons.This is somewhat surprising, as I would imaging leaving
depth
andnum_cells
unspecified would lead to a neural network with no hidden layer at all. Not sure why usedepth=3
andnum_cells=32
as default here :)This is not really a bug report, just IMHO a weird design choice which is also not documented. Would appreciate if we can discuss and reconsider this.
To Reproduce
Expected behavior
System info
Reason and Possible fixes
https://github.com/pytorch/rl/blob/0063741839a3e5e1a527947945494d54f91bc629/torchrl/modules/models/models.py#L182-L188
Checklist