2022-07-12 07:01:58 +00:00
|
|
|
import torch
|
2022-11-01 14:53:51 +00:00
|
|
|
|
|
|
|
from ...registry import meta_patched_function
|
2022-07-12 07:01:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
@meta_patched_function.register(torch.nn.functional.layer_norm)
|
|
|
|
def torch_nn_func_layernorm(input, normalized_shape, weight=None, bias=None, eps=1e-05):
|
2023-09-19 06:20:26 +00:00
|
|
|
return torch.empty(input.shape, device="meta")
|
2022-07-12 07:01:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
@meta_patched_function.register(torch.nn.functional.batch_norm)
|
2023-09-19 06:20:26 +00:00
|
|
|
def torch_nn_func_batchnorm(
|
|
|
|
input, running_mean, running_var, weight=None, bias=None, training=False, momentum=0.1, eps=1e-05
|
|
|
|
):
|
|
|
|
return torch.empty(input.shape, device="meta")
|