Compare commits

...

1 Commits

Author SHA1 Message Date
f2d1ce41ed Add a check to mitigate CVE-2022-41900 2022-11-30 14:47:46 +00:00

View File

@ -315,6 +315,8 @@ class TFFunnelAttentionStructure:
"""Apply 1D pooling to a tensor of size [B x T (x H)]."""
if tensor is None:
return None
if isinstance(stride, float) or stride < 1:
raise ValueError("Stride must be an integer >= 1")
# Do the pool recursively if tensor is a list or tuple of tensors.
if isinstance(tensor, (tuple, list)):