Make quote style consistent (#891)

This commit is contained in:
Sebastian Raschka
2025-10-21 19:42:33 -05:00
committed by GitHub
parent 9276edbc37
commit 7ca7c47e4a
24 changed files with 239 additions and 81 deletions

View File

@@ -60,7 +60,7 @@ class MultiHeadAttention(nn.Module):
self.W_value = nn.Linear(d_in, d_out, bias=qkv_bias)
self.out_proj = nn.Linear(d_out, d_out) # Linear layer to combine head outputs
self.dropout = nn.Dropout(dropout)
self.register_buffer('mask', torch.triu(torch.ones(context_length, context_length), diagonal=1))
self.register_buffer("mask", torch.triu(torch.ones(context_length, context_length), diagonal=1))
def forward(self, x):
b, num_tokens, d_in = x.shape

View File

@@ -33,8 +33,8 @@ def test_main(capsys):
captured = capsys.readouterr()
# Normalize line endings and strip trailing whitespace from each line
normalized_expected = '\n'.join(line.rstrip() for line in expected.splitlines())
normalized_output = '\n'.join(line.rstrip() for line in captured.out.splitlines())
normalized_expected = "\n".join(line.rstrip() for line in expected.splitlines())
normalized_output = "\n".join(line.rstrip() for line in captured.out.splitlines())
# Compare normalized strings
assert normalized_output == normalized_expected