namespace-Pt
commited on
Commit
•
deaf631
1
Parent(s):
19abfc8
Upload modeling_beacon.py with huggingface_hub
Browse files- modeling_beacon.py +2 -1
modeling_beacon.py
CHANGED
@@ -243,7 +243,8 @@ class Memory(torch.nn.Module):
|
|
243 |
# use the minimal possible length for this sequence (the smallest fold ratio)
|
244 |
beacon_ratio = beacon_ratio[minimum_length_index]
|
245 |
else:
|
246 |
-
|
|
|
247 |
self._ratio = beacon_ratio
|
248 |
else:
|
249 |
beacon_ratio = self._ratio
|
|
|
243 |
# use the minimal possible length for this sequence (the smallest fold ratio)
|
244 |
beacon_ratio = beacon_ratio[minimum_length_index]
|
245 |
else:
|
246 |
+
beacon_ratio = max(beacon_ratio)
|
247 |
+
logger.warning(f"Failed to find valid fold window and size for sequence length {sequence_length}, as the maximum theoretical length is {max(max_lengths)}. Fall back to use the maximum one: {beacon_ratio}.")
|
248 |
self._ratio = beacon_ratio
|
249 |
else:
|
250 |
beacon_ratio = self._ratio
|