(output)
| 19864 | return new Context(this); |
| 19865 | } |
| 19866 | deserialize_graph_output(output) { |
| 19867 | if (output.type === 'as_tensor') { |
| 19868 | return this.serialized_name_to_node.__getitem__(output.as_tensor.name); |
| 19869 | } else if (output.type === 'as_sym_int') { |
| 19870 | return this.serialized_name_to_node.__getitem__(output.as_sym_int.as_name); |
| 19871 | } else if (output.type === 'as_sym_bool') { |
| 19872 | return this.serialized_name_to_node.__getitem__(output.as_sym_bool.as_name); |
| 19873 | } else if (output.type === 'as_sym_float') { |
| 19874 | return this.serialized_name_to_node.__getitem__(output.as_sym_float.as_name); |
| 19875 | } else if (output.type === 'as_int') { |
| 19876 | return output.as_int; |
| 19877 | } else if (output.type === 'as_float') { |
| 19878 | return output.as_float; |
| 19879 | } else if (output.type === 'as_bool') { |
| 19880 | return output.as_bool; |
| 19881 | } else if (output.type === 'as_none') { |
| 19882 | return null; |
| 19883 | } |
| 19884 | throw new python.Error(`Unsupported graph node ${output.type}.`); |
| 19885 | } |
| 19886 | deserialize_graph(serialized_graph) { |
| 19887 | for (const [name, tensor_value] of serialized_graph.tensor_values) { |
| 19888 | const meta_val = this.deserialize_tensor_meta(tensor_value.meta || tensor_value, this.fake_tensor_mode); |
no test coverage detected