此版本的主要更改是弃用命令行参数,取而代之的是实验规范文件字段。现在唯一接受的标志是用于实验规范文件的 -e
。所有其他参数必须与实验配置中的字段相对应。
下表显示了这些 CLI 更新的示例。 这并非所有操作的详尽列表,但这些更改可以推广到作为 TAO 5.5 一部分包含的所有网络。
有关哪些字段可用于配置以及更多示例的详细信息,请参见每个网络各自的文档。
网络 |
TAO 5.2.x |
TAO 5.5.x |
PyTorch |
tao model <network> train -e $SPECS_DIR/train.yaml \
-r $RESULTS_DIR \
-k $KEY \
--gpus 2 \
train.num_epochs=2
|
tao model <network> train -e $SPECS_DIR/train.yaml \
results_dir=$RESULTS_DIR \
encryption_key=$KEY \
train.num_gpus=2 \
train.num_epochs=2
|
TF2 |
tao model <network> train -e $SPECS_DIR/train.yaml \
--gpus 1 \
--gpu_index 0 \
train.num_epochs=2
|
tao model <network> train -e $SPECS_DIR/train.yaml \
num_gpus=1 \
gpu_ids=[0] \
train.num_epochs=2
|
数据服务 |
tao dataset augmentation generate -e $SPECS_DIR/augment.yaml \
-r $RESULTS_DIR \
--gpus 2 \
data.image_dir=$IMAGE_DIR
|
tao dataset augmentation generate -e $SPECS_DIR/augment.yaml \
results_dir=$RESULTS_DIR \
num_gpus=2 \
data.image_dir=$IMAGE_DIR
|
部署 |
tao deploy <network> gen_trt_engine -e $SPECS_DIR/gen_trt_engine.yaml \
-r $RESULTS_DIR \
-k $KEY \
--gpu_index 1 \
gen_trt_engine.onnx_file=$ONNX_FILE
gen_trt_engine.trt_engine=$ENGINE_PATH
|
tao deploy <network> gen_trt_engine -e $SPECS_DIR/gen_trt_engine.yaml \
results_dir=$RESULTS_DIR \
encryption_key=$KEY \
gen_trt_engine.gpu_id=1 \
gen_trt_engine.onnx_file=$ONNX_FILE
gen_trt_engine.trt_engine=$ENGINE_PATH
|