tm convert 到 caffe 参数问题
HaoRanLyu opened this issue · 4 comments
HaoRanLyu commented
master源码安装,TracedModule 转换到 caffe 的时候由于参数问题会报错,没有outspec
Traceback (most recent call last):
File "/home/lvhaoran/.local/bin/convert", line 187, in <module>
main()
File "/home/lvhaoran/.local/bin/convert", line 180, in main
args.func(args)
File "/home/lvhaoran/.local/bin/convert", line 31, in to_caffe
args.input, prototxt=args.prototxt, caffemodel=args.caffemodel, outspec=outspec
TypeError: tracedmodule_to_caffe() got an unexpected keyword argument 'outspec'
dingshaohua960303 commented
目前TracedModule转换器还不支持通过outspec指定end point, 我们加一下这个功能。
dingshaohua960303 commented
可以先把 https://github.com/MegEngine/mgeconvert/blob/master/mgeconvert/converters/tm_to_caffe.py#L19
改成
def tracedmodule_to_caffe(
traced_module,
prototxt="out.prototxt",
caffemodel="out.caffemodel",
outspec=None,
use_empty_blobs=False,
):
HaoRanLyu commented
嗯对,我是先这样绕过的,后续版本可以把这个参数加上
CeryZhai commented
目前的版本已经支持