(module: torch.nn.Module)
| 68 | # For torch.nn.DataParallel compatibility in PyTorch 1.5 |
| 69 | |
| 70 | def find_tensor_attributes(module: torch.nn.Module) -> List[Tuple[str, Tensor]]: |
| 71 | tuples = [(k, v) for k, v in module.__dict__.items() if torch.is_tensor(v)] |
| 72 | return tuples |
| 73 | |
| 74 | gen = parameter._named_members(get_members_fn=find_tensor_attributes) |
| 75 | first_tuple = next(gen) |
nothing calls this directly
no outgoing calls
no test coverage detected