(config_path)
| 422 | |
| 423 | |
| 424 | def get_exp_name(config_path): |
| 425 | weight_dir = get_dirname(config_path) |
| 426 | weight_name = os.path.basename(weight_dir) |
| 427 | config_name = os.path.basename(config_path).split(".json")[0].replace("config", "") |
| 428 | if config_name == "": |
| 429 | exp_name = f"{weight_name}" |
| 430 | else: |
| 431 | if config_name.startswith("_"): |
| 432 | config_name = config_name[1:] |
| 433 | exp_name = f"{weight_name}_{config_name}" |
| 434 | return exp_name |
| 435 | |
| 436 | |
| 437 | def get_embedding_layer(config, weight_dir, state_dict): |