如何集群预测?
Created by: wchange
提交任务的脚本:
paddle cluster_train \
--config test/user_image_model/predictor.dbn.py \
--use_gpu cpu \
--time_limit 10:00:00 \
--submitter xxxxxx \
--num_nodes 40 \
--job_priority high \
--trainer_count 4 \
--num_passes 10 \
--log_period 1000 \
--dot_period 100 \
--config_args=is_predict=1 \
--saving_period 1 \
--predict_output_dir predict_result \
--where XXXXXX \
--job_name xxxxx \
--thirdparty=$SCRIPT_PATH/thirdparty
添加--job=test会提示
submit.py: error: ambiguous option: --job=test could match --job_priority, --job_name
网络配置:
cluster_config(
fs_name = "xxxx",
fs_ugi = "xxxx",
work_dir = "xxxx",
init_model_path = "xxxx",
test_data_path = "xxxx",
has_meta_data = False,
)
define_py_data_sources2(train_list=trn,
test_list=tst,
module="user_image_provider",
obj=process,
args={})
batch_size = 128 if not is_predict else 1
settings(
batch_size=batch_size,
learning_rate=2e-5,
learning_method=AdamOptimizer(),
regularization=L2Regularization(8e-4),
gradient_clipping_threshold=25
)
data = data_layer(name="input", size=43099)
hidden = fc_layer(input=data, size=1024, act=ReluActivation())
hidden = fc_layer(input=hidden, size=512, act=ReluActivation())
hidden = fc_layer(input=hidden, size=128, act=ReluActivation())
output = fc_layer(input=hidden, size=2, act=SoftmaxActivation())
if not is_predict:
label = data_layer(name="label", size=2)
classification_cost(input=output, label=label)
cls = classification_cost(input=output, label=label, evaluator=auc_evaluator)
outputs(cls)
else:
maxid = maxid_layer(output)
outputs([maxid, output])
提交任务后train.log提示:
Your data part files is less than the mpi nodes you set!
不太清楚如何能够切换到test模式,辛苦解惑一下~