Skip to content

[BUG] No activations in BlockRNNModel output MLP #2492

Closed
@slishak-PX

Description

Describe the bug
I've been trying to understand the differences between BlockRNNModel and RNNModel; in particular, why one only supports future covariates, one only supports past covariates, and neither support static covariates. This is still unclear to me, however it's not the reason for this issue.

While I was looking at the source, I noticed that in BlockRNNModel, an MLP is being created which is just a stack of linear layers with no activations in between, which seems like a mistake.

for feature in self.num_layers_out_fc + [
self.out_len * self.target_size * self.nr_params
]:
feats.append(nn.Linear(last, feature))
last = feature
self.fc = nn.Sequential(*feats)

Expected behavior
There should be an nonlinear activation function between the linear layers, otherwise it is the same as just having a single linear layer. An argument to BlockRNNModel should be provided that allows the user to choose this activation function.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerspr_welcomeOpen to be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions