We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3b01f0 commit 6ee0a7bCopy full SHA for 6ee0a7b
bandits/algorithms/neural_bandit_model.py
@@ -20,7 +20,7 @@ def __init__(self, optimizer, hparams, name):
20
def build_layer(self, input_dim, output_dim, last=False):
21
"""Builds a fc layer with num_inputs and num_outputs"""
22
layer = [nn.Linear(input_dim, output_dim)]
23
- torch.nn.init.uniform_(layer[0], -0.3, 0.3)
+ torch.nn.init.uniform_(layer[0].weight, -0.3, 0.3)
24
if not last: layer += [nn.ReLU()]
25
# TODO: Maybe add layer_norm
26
if self.hparams.keep_prob < 1.:
0 commit comments