From cc6f0162ff4c50a57bec0c30d8ebf001748e4af3 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Wed, 18 Oct 2023 20:57:43 +0200 Subject: [PATCH] miniblock: Fix type annotation of linear_layer --- tianshou/utils/net/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tianshou/utils/net/common.py b/tianshou/utils/net/common.py index 5886912..d1a1135 100644 --- a/tianshou/utils/net/common.py +++ b/tianshou/utils/net/common.py @@ -22,7 +22,7 @@ def miniblock( norm_args: tuple[Any, ...] | dict[Any, Any] | None = None, activation: ModuleType | None = None, act_args: tuple[Any, ...] | dict[Any, Any] | None = None, - linear_layer: type[nn.Linear] = nn.Linear, + linear_layer: TLinearLayer = nn.Linear, ) -> list[nn.Module]: """Construct a miniblock with given input/output-size, norm layer and activation.""" layers: list[nn.Module] = [linear_layer(input_size, output_size)]