Skip to content

Commit

Permalink
minor fixes to the LRA setup
Browse files Browse the repository at this point in the history
  • Loading branch information
blefaudeux committed Jan 12, 2022
1 parent b48293e commit 79cdac9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions requirements-lra.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
tensorboard>=2.3.0
tensorflow>=2.3.1
tensorflow-datasets>=4.0.1
tensorflow-text>=2.7.3
submitit
fvcore
4 changes: 2 additions & 2 deletions xformers/benchmarks/LRA/code/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"eval_frequency": 50,
"num_train_steps": 10000,
"num_eval_steps": 62,
"gradient_accumulation": 1
"gradient_accumulation": 2
},
"model": {
"pooling_mode": "mean",
Expand All @@ -94,7 +94,7 @@
},
"xformer": [
{
"reversible": true,
"reversible": false,
"block_type": "encoder",
"num_layers": 2,
"layer_norm_style": "pre",
Expand Down
2 changes: 1 addition & 1 deletion xformers/components/attention/attention_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AttentionMask:
"""

def __init__(self, additive_mask: torch.Tensor, is_causal: bool = False):
assert additive_mask.is_floating_point()
assert additive_mask.is_floating_point(), additive_mask.dtype
assert not additive_mask.requires_grad

if additive_mask.ndim == 2:
Expand Down

0 comments on commit 79cdac9

Please sign in to comment.