Load and Validate (LAV)
This file describes how to evaluate a trained model performed by Load-And-Validate (LAV). LAV loads an exported model, applies it on provided data, and finally compute the metrics and losses defined in the model but also the output of an optionally provided Evaluator.
Calling LAV via the command line
To load and validate a model use a [saved model](http://gitea.planet-ai.de/pai/tf2_aip/wiki/Model-exporting) (e.g. export or best) and the tfaip-lav script, usage:
Parameters
LAVParams
The PipelineParams of the LAVParams are accessed directly via –lav, e.g.
The DeviceParams can be set by, e.g.:
DataGeneratorParams
tfaip-lav allows to adapt the data generator parameters which is useful to change the evaluation data (by default the validation generator when training is used).
For a ListFileScenario, the evaluation list can be changed by:
Other Parameters
Specify
--run-eagerlyto run lav in eager-mode (useful for debugging)--dumpto dump the targets and predictions to a pickle file (implement a custom LAV and LAV.extract_dump_data to modify the dump)
Implement a Custom LAV
The default LAV module can be extended to change the default behaviour.
Do not forget the register it in the Scenario at ScenarioBase.lav_cls() or ScenarioBase.create_lav().