Skip to content

Commit

Permalink
PE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaczan committed Jun 21, 2024
1 parent 9e86f44 commit 63b69bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,18 @@

Generative Pre-trained Transformer in PyTorch

work in progress
<figure>
<div align="center">
<a href="https://anitamaczan.pl/#problem_n_cial" target="_blank">
<img src="https://anitamaczan.pl/problem_n_cial.jpg" width="250" alt="'N-body problem' by Anita Maczan, Acrylic on canvas, 80x100, 2024">
</a>
</div>
<figcaption><div align="center" style="font-family: monospace; font-size: 0.75rem">"N-body problem" by Anita Maczan, Acrylic on canvas, 80x100, 2024</div></figcaption>
</p>
</figure>

## License

GPL v3

Jędrzej Maczan, 2024
4 changes: 2 additions & 2 deletions src/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch.nn as nn

from src.positional_encoding import PositionalEncoding
from transformer_block import TransformerBlock
from src.transformer_block import TransformerBlock

torch.manual_seed(1995)

Expand Down Expand Up @@ -55,7 +55,7 @@ def __init__(

def forward(self, x):
x = self.embeddings(x)
x = self.positional_encoding(x)
x = x + self.positional_encoding(x)
x = self.dropout(x)

for block in self.transformer_blocks:
Expand Down

0 comments on commit 63b69bb

Please sign in to comment.