Created
August 24, 2022 00:48
-
-
Save ktakayama/db97197ffab3f4d7e05140a8c683eb95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- functional.py_ 2022-08-23 17:07:29.000000000 +0900 | |
+++ functional.py 2022-08-23 17:07:31.000000000 +0900 | |
@@ -2506,9 +2506,9 @@ def layer_norm( | |
""" | |
if has_torch_function_variadic(input, weight, bias): | |
return handle_torch_function( | |
- layer_norm, (input, weight, bias), input, normalized_shape, weight=weight, bias=bias, eps=eps | |
+ layer_norm, (input.contiguous(), weight, bias), input, normalized_shape, weight=weight, bias=bias, eps=eps | |
) | |
- return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled) | |
+ return torch.layer_norm(input.contiguous(), normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment