#include <Input.h>
Definition at line 27 of file Input.h.
◆ build()
| void caffeimport::InputBuilder::build |
( |
const ::caffe::LayerParameter & |
layer, |
|
|
GraphBuilderContext * |
context |
|
) |
| const |
|
overridevirtual |
Implements caffeimport::GraphBuilder.
Definition at line 32 of file Input.cpp.
33{
35 std::map<std::string, tensor::Shape> &shape_ctx = context->shape_ctx();
36 std::map<std::string, coco::Bag *> &bag_ctx = context->bag_ctx();
37
38 assert(layer.has_input_param());
39 const auto ¶m = layer.input_param();
40
41 for (uint32_t n = 0; n < layer.top_size(); ++n)
42 {
43 const auto &
name = layer.top(n);
45
46 auto bag = module->entity()->bag()->create(num_elements(shape));
47 auto input =
module->entity()->input()->create(shape);
48
52
53 module->input()->insert(input);
54
56 shape_ctx[
name] = shape;
57 }
58}
Top-level element of coco IR which represents a neural network.
tensor::Shape as_tensor_shape(const ::caffe::BlobShape &blob_shape)
References caffeimport::as_tensor_shape(), caffeimport::GraphBuilderContext::bag_ctx(), and caffeimport::GraphBuilderContext::shape_ctx().
The documentation for this class was generated from the following files:
- compiler/_deprecated/enco/frontend/caffe/src/Layer/Input.h
- compiler/_deprecated/enco/frontend/caffe/src/Layer/Input.cpp