Skip to content

Commit

Permalink
trim
Browse files Browse the repository at this point in the history
  • Loading branch information
zetwhite committed Jan 15, 2024
1 parent 3e4bd34 commit 99ec326
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion compute/cker/include/cker/train/operation/ReLU6.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ inline void ReLU6Grad(const Shape &output_shape, const float *output_data,
incoming_map.array() *
(0.0f < output_map.array() && output_map.array() < 6.0f).template cast<float>();
else
throw std::runtime_error("cker::ReLUGrad: Unsupported shape");
throw std::runtime_error("cker::ReLU6Grad: Unsupported shape");
}

} // namespace train
Expand Down
11 changes: 0 additions & 11 deletions compute/cker/src/train/Relu6.test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ using namespace nnfw::cker;
template <typename T> class Relu6OpVerifier
{
public:
void verifyForward(const std::vector<T> &input, const std::vector<T> &expected_output)
{
assert(input.size() == expected_output.size());

std::vector<T> calc_output(input.size()); // calcuated output
ReLU6(Shape{static_cast<int>(input.size())}, input.data(), calc_output.data());

for (size_t i = 0; i < calc_output.size(); ++i)
ASSERT_EQ(expected_output[i], calc_output[i]);
}

void verifyBackward(const std::vector<T> &output, const std::vector<T> &input_bwd,
const std::vector<T> &expected_output_bwd, bool expect_eq = true)
{
Expand Down

0 comments on commit 99ec326

Please sign in to comment.