Skip to content

Commit

Permalink
Update gnn_es_index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kayuksel authored Jan 7, 2023
1 parent e267fd4 commit 55bbc69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnn_es_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def block(in_feat, out_feat):
*block(noise_dim+args.cnndim, 512), *block(512, 1024), nn.Linear(1024, len(assets)))
init_weights(self)
self.extract = Extractor(args.cnndim)
self.std_weight = nn.Parameter(torch.zeros(len(assets)).to(device)) # changing this for convenience of GradInit
self.std_weight = nn.Parameter(torch.zeros(len(assets)).to(device))
def forward(self, x):
mu = self.model(self.extract(x))
return mu, mu + (self.std_weight * torch.randn_like(mu))
Expand Down

0 comments on commit 55bbc69

Please sign in to comment.