(self, command: GraphCommand)
| 172 | ] |
| 173 | |
| 174 | def process(self, command: GraphCommand) -> Any: |
| 175 | if command.command_type == GraphCommandType.FORMAT_CLIP: |
| 176 | return self.format_clip() |
| 177 | if command.command_type == GraphCommandType.FORMAT_PAD: |
| 178 | return self.format_pad() |
| 179 | if command.command_type == GraphCommandType.FORMAT_GATHER: |
| 180 | return self.format_gather() |
| 181 | if command.command_type == GraphCommandType.FORMAT_CAST: |
| 182 | return self.format_cast() |
| 183 | if command.command_type == GraphCommandType.DELETE_ISOLATED: |
| 184 | return self.delete_isolated() |
| 185 | if command.command_type == GraphCommandType.FORMAT_INT64_CONSTANT: |
| 186 | return self.format_int64_constant() |
| 187 | if command.command_type == GraphCommandType.FORMAT_PARAMETERS: |
| 188 | return self.format_parameter() |
| 189 | if command.command_type == GraphCommandType.FORMAT_CONSTANT_INPUT: |
| 190 | return self.remove_constant_input() |
| 191 | if command.command_type == GraphCommandType.FORMAT_SLICE: |
| 192 | return self.format_slice() |
| 193 | if command.command_type == GraphCommandType.FORMAT_RESIZE: |
| 194 | return self.format_resize() |
| 195 | if command.command_type == GraphCommandType.TRUNCATE_ON_VAR: |
| 196 | assert isinstance(command, TruncateGraphCommand), f'Use TruncateGraphCommand here.' |
| 197 | return self.truncate_on_var(command.var, command.mark_as_output) |
| 198 | if command.command_type == GraphCommandType.REMOVE_IDENTITY: |
| 199 | return self.remove_identity() |
| 200 | if command.command_type == GraphCommandType.CONVERT_TO_TENSOR: |
| 201 | return self.convert_to_tensor() |
| 202 | |
| 203 | def format_slice(self) -> None: |
| 204 | """ |
nothing calls this directly
no test coverage detected