| 151 | export_autoencoder_encoder(model, args.output_path) |
| 152 | |
| 153 | def main(): |
| 154 | parser = argparse.ArgumentParser() |
| 155 | |
| 156 | parser.add_argument( |
| 157 | "-m", |
| 158 | "--model_config", |
| 159 | type=str, |
| 160 | help="Path to the model configuration file.", |
| 161 | required=True, |
| 162 | ) |
| 163 | parser.add_argument( |
| 164 | "--ckpt_path", |
| 165 | type=str, |
| 166 | help="Path to the model checkpoint file.", |
| 167 | required=True, |
| 168 | ) |
| 169 | |
| 170 | parser.add_argument( |
| 171 | "--output_path", |
| 172 | type=str, |
| 173 | help="Path to the output directory for the exported models.", |
| 174 | default=".", |
| 175 | required=False, |
| 176 | ) |
| 177 | |
| 178 | export(parser.parse_args()) |
| 179 | |
| 180 | if __name__ == "__main__": |
| 181 | main() |