Unverified Commit 54e55b52 authored by Nicolas Patry's avatar Nicolas Patry Committed by GitHub
Browse files

Fixing conversation test for torch 1.8 (#10545)

parent dc9aaa38
......@@ -53,9 +53,9 @@ class SimpleConversationPipelineTests(unittest.TestCase):
model = GPT2LMHeadModel(config)
# Force model output to be L
V, D = model.lm_head.weight.shape
bias = torch.zeros(V, requires_grad=True)
weight = torch.zeros((V, D), requires_grad=True)
bias = torch.zeros(V)
bias[76] = 1
weight = torch.zeros((V, D), requires_grad=True)
model.lm_head.bias = torch.nn.Parameter(bias)
model.lm_head.weight = torch.nn.Parameter(weight)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment