Output Layer */
| 94 | |
| 95 | /** Output Layer */ |
| 96 | class OutputLayer final : public ILayer |
| 97 | { |
| 98 | public: |
| 99 | /** Construct an output layer. |
| 100 | * |
| 101 | * @param[in] accessor Accessor to give output tensor data to. |
| 102 | * @param[in] connection_idx (Optional) Input connection index |
| 103 | */ |
| 104 | OutputLayer(ITensorAccessorUPtr accessor, unsigned int connection_idx = 0) |
| 105 | : _accessor(std::move(accessor)), _connection_idx(connection_idx) |
| 106 | { |
| 107 | } |
| 108 | |
| 109 | NodeID create_layer(IStream &s) override |
| 110 | { |
| 111 | NodeParams common_params = {name(), s.hints().target_hint}; |
| 112 | NodeIdxPair input = {s.tail_node(), _connection_idx}; |
| 113 | return GraphBuilder::add_output_node(s.graph(), common_params, input, std::move(_accessor)); |
| 114 | } |
| 115 | |
| 116 | private: |
| 117 | ITensorAccessorUPtr _accessor; |
| 118 | unsigned int _connection_idx; |
| 119 | }; |
| 120 | |
| 121 | /** Activation Layer */ |
| 122 | class ActivationLayer final : public ILayer |
no outgoing calls
no test coverage detected