Commit 1c7f1b67 authored by Adam Rogowiec's avatar Adam Rogowiec

:Remove leftover commented code and apply style formatting

parent 239de984
......@@ -36,7 +36,6 @@
#include "ngraph/op/reverse.hpp"
#include "ngraph/op/select.hpp"
#include "ngraph/op/util/broadcasting.hpp"
#include "ngraph/op/util/reshape.hpp"
#include "ngraph/shape.hpp"
#include "ngraph/type/element_type.hpp"
#include "utils/reshape.hpp"
......
......@@ -18,8 +18,8 @@
#include <cmath>
#include <functional>
#include "ngraph/builder/split.hpp"
#include "ngraph/builder/reshape.hpp"
#include "ngraph/builder/split.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/dot.hpp"
......
......@@ -18,8 +18,8 @@
#include <cmath>
#include <functional>
#include "ngraph/builder/split.hpp"
#include "ngraph/builder/reshape.hpp"
#include "ngraph/builder/split.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/dot.hpp"
......@@ -191,19 +191,6 @@ NodeVector op::RNNCell::decompose_op() const
shared_ptr<Node> op::RNNCell::get_bias() const
{
// shared_ptr<Node> bias;
// if (get_input_size() == 5)
// {
// bias = get_argument(4);
// }
// else
// {
// // As default bias is all zeros, thus just initialize it with appropriate shape and zeros.
// bias = op::Constant::create(input(0).get_element_type(),
// Shape{2 * get_hidden_size()},
// vector<float>(2 * get_hidden_size(), 0.f));
// }
// return bias;
shared_ptr<Node> bias;
// Split B onto Wb an Rb and add them.
NodeVector b_W_R = builder::split(get_argument(4), 2);
......
......@@ -69,20 +69,22 @@ op::util::ActivationFunction op::util::RNNCellBase::get_activation_function(size
return afunc;
}
shared_ptr<Node> op::util::RNNCellBase::add(const shared_ptr<Node>& lhs, const shared_ptr<Node>& rhs)
shared_ptr<Node> op::util::RNNCellBase::add(const shared_ptr<Node>& lhs,
const shared_ptr<Node>& rhs)
{
auto args = op::numpy_style_broadcast({lhs, rhs});
return {make_shared<op::Add>(args.at(0), args.at(1))};
}
shared_ptr<Node> op::util::RNNCellBase::sub(const shared_ptr<Node>& lhs, const shared_ptr<Node>& rhs)
shared_ptr<Node> op::util::RNNCellBase::sub(const shared_ptr<Node>& lhs,
const shared_ptr<Node>& rhs)
{
auto args = op::numpy_style_broadcast({lhs, rhs});
return {make_shared<op::Subtract>(args.at(0), args.at(1))};
}
shared_ptr<Node> op::util::RNNCellBase::mul(const shared_ptr<Node>& lhs, const shared_ptr<Node>& rhs)
shared_ptr<Node> op::util::RNNCellBase::mul(const shared_ptr<Node>& lhs,
const shared_ptr<Node>& rhs)
{
auto args = op::numpy_style_broadcast({lhs, rhs});
return {make_shared<op::Multiply>(args.at(0), args.at(1))};
......
......@@ -59,7 +59,10 @@ namespace ngraph
std::size_t get_hidden_size() const { return m_hidden_size; }
float get_clip() const { return m_clip; }
const std::vector<std::string>& get_activations() const { return m_activations; }
const std::vector<float>& get_activation_alpha() const { return m_activation_alpha; }
const std::vector<float>& get_activation_alpha() const
{
return m_activation_alpha;
}
const std::vector<float>& get_activation_beta() const { return m_activation_beta; }
protected:
///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment