Files
pytorch-ts/pts/model/utils.py
T
2019-10-27 14:22:36 +01:00

8 lines
176 B
Python

import inspect
import torch.nn as nn
def get_module_forward_input_names(module: nn.Module):
params = inspect.signature(module.forward).parameters
return list(params)