()
| 319 | |
| 320 | |
| 321 | def create_weights_folder(): |
| 322 | # Create a folder to save weights of trained models |
| 323 | this_file_path = pathlib.Path(__file__).parent.absolute() |
| 324 | temp, _ = os.path.split(this_file_path) |
| 325 | weights_path = os.path.join(temp, 'weights') |
| 326 | if not os.path.exists(weights_path): |
| 327 | os.mkdir(weights_path) |
| 328 | assert os.path.exists(weights_path), 'Cannot create weights folder: {}'.format(weights_path) |
| 329 | return weights_path |