From 30b531086c5efefef2e564b4c343347fd4df42ec Mon Sep 17 00:00:00 2001 From: Tuozhen Liu Date: Thu, 14 Apr 2022 11:23:08 +0800 Subject: [PATCH] Fixed issue #943 about TCTS init_fore_model (#1047) p.init_fore_model = False -> p.requires_grad = False --- qlib/contrib/model/pytorch_tcts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qlib/contrib/model/pytorch_tcts.py b/qlib/contrib/model/pytorch_tcts.py index 8dadefb68..4f87e5f1e 100644 --- a/qlib/contrib/model/pytorch_tcts.py +++ b/qlib/contrib/model/pytorch_tcts.py @@ -145,7 +145,7 @@ class TCTS(Model): init_fore_model = copy.deepcopy(self.fore_model) for p in init_fore_model.parameters(): - p.init_fore_model = False + p.requires_grad = False self.fore_model.train() self.weight_model.train()