create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
(path)
| 94 | |
| 95 | |
| 96 | def mkdir(path): |
| 97 | """create a single empty directory if it didn't exist |
| 98 | |
| 99 | Parameters: |
| 100 | path (str) -- a single directory path |
| 101 | """ |
| 102 | if not os.path.exists(path): |
| 103 | os.makedirs(path) |
| 104 | |
| 105 | def copy_state_dict(cur_state_dict, pre_state_dict, prefix='', load_name=None): |
| 106 | def _get_params(key): |