用NNI给神经网络调参
问题描述
运行nni的example可以successed,自己的py文件能正常运行,但web UI显示failed。
原因分析:
py文件里有bug
解决方案:
把以下三行代码nni.get_next_parameter(), nni.report_final_result(), nni.report_intermediate_result()都注释掉,然后跑一下程序看看有没有bug。
解决方案:
没有bug的话,就看看report的值是不是数字。report的必须是数字,不是tensor等其他变量。另外还需要看看GPU可不可用,如果GPU内存不够,就会报错。
原因分析:
config.yml中 trialCommand: python3
解决方案:
windows下把config.yml中 trialCommand: python3 改为 trialCommand: python
原因分析:
search_space.json中参数类型不对