(self, tensor)
| 719 | """Model variable as a PyTorch tensor.""" |
| 720 | |
| 721 | def __init__(self, tensor): |
| 722 | if isinstance(tensor, torch.nn.Parameter): |
| 723 | tensor = tensor.data |
| 724 | |
| 725 | self.tensor = tensor.contiguous() |
| 726 | |
| 727 | @classmethod |
| 728 | def from_numpy(cls, array): |
nothing calls this directly
no outgoing calls
no test coverage detected