(
self, target: str, input_kind: InputKind, value: Tensor
)
| 51 | super().__init__(fake_tensor_mode=fake_tensor_mode) |
| 52 | |
| 53 | def insert_input_spec( |
| 54 | self, target: str, input_kind: InputKind, value: Tensor |
| 55 | ) -> None: |
| 56 | persistent: Optional[bool] = None |
| 57 | if input_kind == InputKind.BUFFER: |
| 58 | persistent = True |
| 59 | self.input_specs.append( |
| 60 | InputSpec( |
| 61 | input_kind, TensorArgument(target), target=target, persistent=persistent |
| 62 | ) |
| 63 | ) |
| 64 | if input_kind == InputKind.PARAMETER or input_kind == InputKind.BUFFER: |
| 65 | self.state_dict[target] = value |
| 66 | elif input_kind == InputKind.CONSTANT_TENSOR: |
| 67 | self.constants[target] = value |
| 68 | |
| 69 | def placeholder( |
| 70 | self, |
no test coverage detected