Skip to content

Commit 6ee0a7b

Browse files
committed
add weight
1 parent b3b01f0 commit 6ee0a7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bandits/algorithms/neural_bandit_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, optimizer, hparams, name):
2020
def build_layer(self, input_dim, output_dim, last=False):
2121
"""Builds a fc layer with num_inputs and num_outputs"""
2222
layer = [nn.Linear(input_dim, output_dim)]
23-
torch.nn.init.uniform_(layer[0], -0.3, 0.3)
23+
torch.nn.init.uniform_(layer[0].weight, -0.3, 0.3)
2424
if not last: layer += [nn.ReLU()]
2525
# TODO: Maybe add layer_norm
2626
if self.hparams.keep_prob < 1.:

0 commit comments

Comments
 (0)