(module, op)
| 164 | raise ValueError(f"Cannot find op {op_name} in module {module}") |
| 165 | |
| 166 | def get_op_name(module, op): |
| 167 | # get the name of the op relative to the module |
| 168 | for name, m in module.named_modules(): |
| 169 | if m is op: |
| 170 | return name |
| 171 | raise ValueError(f"Cannot find op {op} in module {module}") |
| 172 | |
| 173 | |
| 174 | def build_model_and_enc(model_path): |