Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

CPU机器上运行benchmark 提示 LRN has not been registered! #472

Open
Yourens opened this issue Nov 5, 2018 · 6 comments
Open

CPU机器上运行benchmark 提示 LRN has not been registered! #472

Yourens opened this issue Nov 5, 2018 · 6 comments

Comments

@Yourens
Copy link

Yourens commented Nov 5, 2018

使用tools/X86_build.sh 编译anakin,然后依据下面的issue 提供的model 生成anakin model
#452

但是在运行benchmark 的时候出现如下错误,
WAN| 11:31:35.00989| 0.060s| main_thread| input.cpp:16] Parsing Input op parameter.
0| 11:31:35.00989| 0.060s| main_thread| input.cpp:19] |-- shape [0]: 2
0| 11:31:35.00989| 0.060s| main_thread| input.cpp:19] |-- shape [1]: 3
0| 11:31:35.00989| 0.060s| main_thread| input.cpp:19] |-- shape [2]: 224
0| 11:31:35.00989| 0.060s| main_thread| input.cpp:19] |-- shape [3]: 224
FTL| 11:31:35.00989| 0.060s| main_thread| factory.h:37] LRN has not been registered!
*** fatal error stack trace: **:
5 0x5bbb59 _start + 41
4 0x7fabafa2a830 __libc_start_main + 240
3 0x5876b3 main + 723
2 0x5c91c7 anakin::test::EngineTest::run_all(char const
) + 1063
1 0x5be029 NetTest_net_execute_base_test::net_execute_base_test() + 1993
0 0x6574ec anakin::Net<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)4>, (anakin::saber::DataType)1, (anakin::Precision)0, (anakin::OpRunType)1>::Net(anakin::graph::Graph<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)4>, (anakin::saber::DataType)1, (anakin::Precision)0>&, bool) + 172

@uraj
Copy link
Contributor

uraj commented Nov 5, 2018

现在LRN没有X86实现,需要启用GPU

@Yourens
Copy link
Author

Yourens commented Nov 6, 2018

能够请教一下有没有CPU能够跑的model,如下链接中的model 如何处理才能被convert?
https://github.com/PaddlePaddle/models/tree/develop/fluid/PaddleNLP/language_model/gru

谢谢!

@uraj
Copy link
Contributor

uraj commented Nov 6, 2018

可以用这个Network in Network model

@Yourens
Copy link
Author

Yourens commented Nov 6, 2018

在使用如下配置转换时

        ProtoPaths:
            - /home/shenyouren/workspace/anakin/caffe/src/caffe/proto/caffe.proto
        PrototxtPath: /home/shenyouren/models/solver.prototxt
        ModelPath: /home/shenyouren/models/nin_imagenet_conv.caffemodel

依旧有错误:

INF | 2018-11-06 11:24:07.323976 | parser_caffe.py:290 _Parsing_new() ]   [CAFFE] Parsing ...
Traceback (most recent call last):
  File "converter.py", line 20, in <module>
    graph = Graph(config)
  File "/home/shenyouren/workspace/anakin/Anakin-0.1.1/tools/external_converter_v2/parser/graph.py", line 37, in __init__
    self.graph_io = self.parser()
  File "/home/shenyouren/workspace/anakin/Anakin-0.1.1/tools/external_converter_v2/parser/kill_caffe/parser_caffe.py", line 34, in __call__
    return self._Parsing_new()
  File "/home/shenyouren/workspace/anakin/Anakin-0.1.1/tools/external_converter_v2/parser/kill_caffe/parser_caffe.py", line 291, in _Parsing_new
    self._DetectionArch()
  File "/home/shenyouren/workspace/anakin/Anakin-0.1.1/tools/external_converter_v2/parser/kill_caffe/parser_caffe.py", line 39, in _DetectionArch
    self._ParserPrototxt()
  File "/home/shenyouren/workspace/anakin/Anakin-0.1.1/tools/external_converter_v2/parser/kill_caffe/parser_caffe.py", line 52, in _ParserPrototxt
    text_format.Merge(f.read(), self.net_parameter)
  File "/home/shenyouren/.local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 525, in Merge
    descriptor_pool=descriptor_pool)
  File "/home/shenyouren/.local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 579, in MergeLines
    return parser.MergeLines(lines, message)
  File "/home/shenyouren/.local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 612, in MergeLines
    self._ParseOrMerge(lines, message)
  File "/home/shenyouren/.local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 627, in _ParseOrMerge
    self._MergeField(tokenizer, message)
  File "/home/shenyouren/.local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 695, in _MergeField
    (message_descriptor.full_name, name))
google.protobuf.text_format.ParseError: 1:1 : Message type "caffe.NetParameter" has no field named "net".

我觉得可能是没有使用deploy.prototxt 导致的。

@uraj
Copy link
Contributor

uraj commented Nov 6, 2018

PrototxtPath需要指向一个deploy.prototxt文件。nin_imagenet的讨论里有人提供了链接.

@Yourens
Copy link
Author

Yourens commented Nov 6, 2018

Thanks, problem solved!

I'm really appreciate for your help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants