MCPcopy Create free account
hub / github.com/ZhengPeng7/BiRefNet / valid

Function valid

evaluation/valid.py:5–9  ·  view source on GitHub ↗
(model, data_loader_test, pred_dir, method='tmp_val', testset='DIS-VD', only_S_MAE=True, device=0)

Source from the content-addressed store, hash-verified

3
4
5def valid(model, data_loader_test, pred_dir, method='tmp_val', testset='DIS-VD', only_S_MAE=True, device=0):
6 model.eval()
7 inference(model, data_loader_test, pred_dir, method, testset, device=device)
8 performance_dict = evaluate(pred_dir, method, testset, only_S_MAE=only_S_MAE, epoch=model.epoch)
9 return performance_dict

Callers 2

validate_modelMethod · 0.90
validate_modelFunction · 0.90

Calls 2

inferenceFunction · 0.90
evaluateFunction · 0.90

Tested by

no test coverage detected