2022-07-12 07:01:58 +00:00
|
|
|
import torch
|
2022-11-01 14:53:51 +00:00
|
|
|
|
|
|
|
from ...registry import meta_patched_module
|
2022-07-12 07:01:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
@meta_patched_module.register(torch.nn.ReLU)
|
|
|
|
@meta_patched_module.register(torch.nn.Sigmoid)
|
|
|
|
@meta_patched_module.register(torch.nn.GELU)
|
|
|
|
@meta_patched_module.register(torch.nn.Tanh)
|
|
|
|
@meta_patched_module.register(torch.nn.ReLU6)
|
2022-07-27 03:03:14 +00:00
|
|
|
@meta_patched_module.register(torch.nn.PReLU)
|
2022-07-12 07:01:58 +00:00
|
|
|
def torch_nn_non_linear_act(self, input):
|
|
|
|
return torch.empty(input.shape, device='meta')
|