clDNN
reorg_yolo.hpp
1 /*
2 // Copyright (c) 2016 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16 
18 #pragma once
19 #include "../C/reorg_yolo.h"
20 #include "primitive.hpp"
21 
22 namespace cldnn
23 {
30 
35  struct reorg_yolo : public primitive_base<reorg_yolo, CLDNN_PRIMITIVE_DESC(reorg_yolo)>
36  {
37  CLDNN_DECLATE_PRIMITIVE(reorg_yolo)
38 
39 
40  reorg_yolo(
44  const primitive_id& id,
45  const primitive_id& input,
46  const uint32_t stride,
47  const padding& output_padding = padding()
48  )
50  , stride(stride)
51  {}
52 
54  reorg_yolo(const dto* dto)
56  , stride(dto->stride)
57  {}
58 
62  uint32_t stride;
63 
64 
65  private:
66  void update_dto(dto& dto) const override
67  {
68  dto.stride = stride;
69  }
70  };
74 }
75 #pragma once
Represents data padding information.
Definition: layout.hpp:125
Normalizes results so they sum to 1.
Definition: reorg_yolo.hpp:35
reorg_yolo(const dto *dto)
Constructs a copy from C API cldnn_region_yolo_desc.
Definition: reorg_yolo.hpp:54
yolo2 topology specific data reorganization primitive
Definition: reorg_yolo.h:39
std::string primitive_id
Unique id of a primitive within a topology.
Definition: primitive.hpp:42
fixed_size_vector_ref input
List of ids of input primitives.
Definition: primitive.hpp:146
uint32_t stride
paramter stride
Definition: reorg_yolo.h:41
base class for all primitives implementations.
Definition: primitive.hpp:190
padding output_padding
Requested output padding.
Definition: primitive.hpp:149
reorg_yolo(const primitive_id &id, const primitive_id &input, const uint32_t stride, const padding &output_padding=padding())
Constructs region_yolo primitive.
Definition: reorg_yolo.hpp:43
uint32_t stride
Defines a scope of a reorg yolo normalization.
Definition: reorg_yolo.hpp:62