Skip to content

Commit

Permalink
last tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jan 20, 2025
1 parent 28eddd6 commit ec05100
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "titans-pytorch"
version = "0.1.8"
version = "0.1.9"
description = "Titans"
authors = [
{ name = "Phil Wang", email = "[email protected]" }
Expand Down
2 changes: 2 additions & 0 deletions titans_pytorch/titans.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ def forward_and_loss(params, inputs, loss_weights, target):

# whether to use averaging of chunks, or attention pooling

assert not (attn_pool_chunks and chunk_size == 1), '`attn_pool_chunks` cannot be set to True if `chunk_size` is set to 1'

if not attn_pool_chunks:
chunk_reduce_module = Reduce('b (n c) ... -> b n ...', 'mean', c = chunk_size)
else:
Expand Down

0 comments on commit ec05100

Please sign in to comment.