Skip to content

Make op_glu_test input asymmetric #11294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions kernels/test/op_glu_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ class OpGluOutTest : public OperatorTest {
const std::vector<int32_t> out_sizes_1 = {2, 2};

// Valid input should give the expected output
Tensor in = tf.ones(sizes);
Tensor in = tf.make(sizes, {0, 1, 2, 3, 4, 5, 6, 7});
Tensor out = tf_out.zeros(out_sizes_1);
op_glu_out(in, 0, out);
expect_tensor_close<DTYPE>(
expect_tensor_close<OUT_DTYPE>(
out,
tf_out.make(
out_sizes_1, /*data=*/{0.731059, 0.731059, 0.731059, 0.731059}));
out_sizes_1, /*data=*/{0, 0.99330717, 1.99505484, 2.99726701}));
const std::vector<int32_t> out_sizes_2 = {4, 1};
out = tf_out.zeros(out_sizes_2);
op_glu_out(in, 1, out);
expect_tensor_close<DTYPE>(
expect_tensor_close<OUT_DTYPE>(
out,
tf_out.make(
out_sizes_2, /*data=*/{0.731059, 0.731059, 0.731059, 0.731059}));
out_sizes_2, /*data=*/{0, 1.90514827, 3.97322869, 5.99453402}));
}

// Mismatched shape tests.
Expand Down
Loading