在做深度机器学习实验的时候,经常需要先做超参数扫描,得到一批实验结果,然后将验证的结果拿出来进一步处理,或是与人工标定比较,手动计算一些关键指标如分类Precision和Recall,或是制作一些曲线。下面是从Azure上实验中取出验证(机器标定)结果的关键代码:
import tempfile
form pathlib import Path
from azureml.core import Dataset
from azureml.core.experiment import Experiment
from azureml.core.script_run_config importScriptrunConfig
form azureml.core.workspace import Workspace
from azureml.train.automl.run import AutoMLRun
automl_run_id="automl_run_id"
dataset_name="dataset_validation"
experiment_name="automl_experiment_name"
csv_out="data/valid.csv"
computer_target="gpu_cluster"
validate_score=True
batch_size=16
resize_size=640
crop_size=480
workspace=Workspace.from_config()
experiment=Experiment(workspace,experiment_