mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-07-12 14:20:06 +08:00
9 lines
177 B
Python
9 lines
177 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)
|