(model,state)
| 206 | return model, model_cond, ema_helper, ema_helper_cond, optimizer_hyponet, optimizer_hrnet, start_epoch, step, loss, min_mpjpe_h36m, min_mpjpe_pw3d |
| 207 | |
| 208 | def load_model(model,state): |
| 209 | state_model = model.state_dict() |
| 210 | for key in state_model.keys(): |
| 211 | if key in state.keys() and state_model[key].shape == state[key].shape: |
| 212 | state_model[key] = state[key] |
| 213 | model.load_state_dict(state_model) |
| 214 | return model |
| 215 | |
| 216 | def get_model_score(config, is_train = True, resume = False, resume_path = None): |
| 217 | neighbour_matrix = get_neighbour_matrix_from_hand(parents,childrens,num_joints=config.hyponet.num_joints,num_edges=config.hyponet.num_twists,knn=config.scorenet.knn) |
no test coverage detected