diff options
author | Alexey Suhov <asuhov@users.noreply.github.com> | 2018-11-23 16:19:43 +0300 |
---|---|---|
committer | openvino-pushbot <44090433+openvino-pushbot@users.noreply.github.com> | 2018-11-23 16:19:43 +0300 |
commit | 55a41d7570f78aaea0d6764d157dd7434730d56f (patch) | |
tree | ba022c71609b93d51119bcb25e5ccb8c7147dbd3 /inference-engine/thirdparty/clDNN/src/include/deconvolution_inst.h | |
parent | 54eab180361ec09fbd82e2bb62adfeb521275774 (diff) | |
download | dldt-55a41d7570f78aaea0d6764d157dd7434730d56f.tar.gz dldt-55a41d7570f78aaea0d6764d157dd7434730d56f.tar.bz2 dldt-55a41d7570f78aaea0d6764d157dd7434730d56f.zip |
Publishing R4 (#41)
* Publishing R4
Diffstat (limited to 'inference-engine/thirdparty/clDNN/src/include/deconvolution_inst.h')
-rw-r--r-- | inference-engine/thirdparty/clDNN/src/include/deconvolution_inst.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/inference-engine/thirdparty/clDNN/src/include/deconvolution_inst.h b/inference-engine/thirdparty/clDNN/src/include/deconvolution_inst.h index 446715954..a2e1516f2 100644 --- a/inference-engine/thirdparty/clDNN/src/include/deconvolution_inst.h +++ b/inference-engine/thirdparty/clDNN/src/include/deconvolution_inst.h @@ -42,9 +42,9 @@ public: void set_depthwise_sep_opt(bool node_depthwise_sep_opt) { depthwise_sep_opt = node_depthwise_sep_opt; } bool get_depthwise_sep_opt() const { return depthwise_sep_opt; } - decltype(auto) input() const { return get_dependency(0); } + program_node& input() const { return get_dependency(0); } - decltype(auto) weights(size_t idx = 0) const + program_node& weights(size_t idx = 0) const { if (static_cast<int32_t>(idx) >= get_split()) throw std::range_error("weights offset too big"); @@ -52,7 +52,7 @@ public: return get_dependency(1 + idx); } - decltype(auto) bias(size_t idx = 0) const + program_node& bias(size_t idx = 0) const { if (static_cast<int32_t>(idx) >= get_split()) throw std::range_error("bias offset too big"); @@ -68,6 +68,23 @@ public: return false; } + program_node& fused_sum(size_t idx = 0) const + { + if (static_cast<int32_t>(idx) > 0) + throw std::range_error("Only one input for fused sum is supported"); + + int d_idx = 1 + this->get_split() + idx; + d_idx += bias_term() ? this->get_split() : 0; + return get_dependency(d_idx); + } + + bool has_fused_sum() const + { + int d_idx = 1 + this->get_split(); + d_idx += bias_term() ? this->get_split() : 0; + return static_cast<int>(dependencies.size()) == (d_idx + 1); + } + private: int32_t split; bool depthwise_sep_opt; @@ -87,7 +104,7 @@ public: public: typed_primitive_inst(network_impl& network, deconvolution_node const& node); - decltype(auto) weights_memory(size_t index) const + memory_impl& weights_memory(size_t index) const { if (static_cast<int32_t>(index) >= node.get_split()) throw std::range_error("weights offset too big"); @@ -95,7 +112,7 @@ public: return dep_memory(1 + index); } - decltype(auto) bias_memory(size_t index) const + memory_impl& bias_memory(size_t index) const { if (argument.bias.size() == 0 && static_cast<int32_t>(index) >= node.get_split()) throw std::range_error("no bias data"); |