创建Estimator - script_params [英] create Estimator - script_params

查看:52
本文介绍了创建Estimator - script_params的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 


我对scirpt_params有疑问。提交实验后,我的状态为"失败",显示此类错误:


---------------- O U T P U T    LOGS ----------------------------------------------- ----------------------------------------------


用法:neural_style.py eval [-h] --content-image CONTENT_IMAGE

                            [--content-scale CONTENT_SCALE] - output-image

                            OUTPUT_IMAGE - 模型模型--cuda CUDA

                            [--export_onnx EXPORT_ONNX]

neural_style.py eval:错误:需要以下参数: - content-image, - output-image, - model, - cuda



$
实验失败。完成运行...

清理所有未完成的运行操作,等待300.0秒

清理1件物品...

清理时间为0.25121021270751953秒



发生错误:2


------------------- -------------------------------------------------- -------------------------------------------------- ------------


我的script_params如下所示:


script_params = {

    'eval':'',

    '--content-image':'images \content-images \\\\\\\\\\\\\\\\\\\\   '--model':'saved_models\candy.pth',

    '--output-image':'images \output-images', 

    '--cuda':int(1)

}




运行脚本的命令如下:


python neural_style / neural_style.py eval
--content-image
images \content-images \\\ nmber.jpg - 型号 saved_models\candy.pth
- 输出图片 images \output-images - cuda 0




有没有人可以帮我解决这个问题在script_params中出了什么问题?

解决方案

看起来neur_style.py正在使用子命令并添加子解析器。如果在script_params中添加它,我不完全确定它是否有效。也许你可以尝试将它与像这样entry_script。


<预类= "prettyprint"> EST =估算(source_directory中= script_folder,
script_params = script_params,
compute_target = compute_target,
entry_script ='neural_style.py eval ',
conda_packages = ['some-package'])

我希望这有帮助,但没有机会尝试。


Hi, 

I have problem with the scirpt_params. After submission of the experiment my status is Failed showing this kind of error:

----------------O U T P U T   L O G S ---------------------------------------------------------------------------------------------

usage: neural_style.py eval [-h] --content-image CONTENT_IMAGE
                            [--content-scale CONTENT_SCALE] --output-image
                            OUTPUT_IMAGE --model MODEL --cuda CUDA
                            [--export_onnx EXPORT_ONNX]
neural_style.py eval: error: the following arguments are required: --content-image, --output-image, --model, --cuda


The experiment failed. Finalizing run...
Cleaning up all outstanding Run operations, waiting 300.0 seconds
1 items cleaning up...
Cleanup took 0.25121021270751953 seconds

Error occurred: 2

-----------------------------------------------------------------------------------------------------------------------------------

My script_params looks as follows:

script_params = {
    'eval': '',
    '–-content-image': 'images\content-images\\amber.jpg',
    '–-model': 'saved_models\candy.pth',
    '–-output-image': 'images\output-images', 
    '–-cuda': int(1)
}


Command to run the script is as follows:

python neural_style/neural_style.py eval –-content-image images\content-images\amber.jpg –-model saved_models\candy.pth –-output-image images\output-images –-cuda 0

Can anybody help me with this issue what is wrong in the script_params?

解决方案

It looks like neural_style.py is using subcommands and adding sub parsers. I am not totally sure if this works if it is added in script_params. Maybe you can try adding it to entry_script with something like this.

est = Estimator(source_directory=script_folder,
                script_params=script_params,
                compute_target=compute_target,
                entry_script='neural_style.py eval',
                conda_packages=['some-package'])

I hope this helps, did not get a chance to try though.


这篇关于创建Estimator - script_params的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆