research/seq_flow_lite/models/sgnn/sgnn_projection_test.cc
// Keep same result of test_projection in sgnn_test.py
Keep same result of test_projection in sgnn_test.py
Keep same result of test_projection in sgnn_test . py
TEST(SgnnProjectionTest, TensorSgnnProjection) {
  SgnnProjectionModel m({"^h", "he", "el", "ll", "lo", "o$", "^h", "hi", "i$"},
                        {0, 6, 9}, {5, 7},
                        0x7FFFFFFF);
  EXPECT_THAT(m.GetOutputShape(), ElementsAre(2, 2));
  EXPECT_THAT(m.ExtractOutputValue(),
              ElementsAreArray(ArrayFloatNear(
                  { 0.448691, -0.238499, -0.037561,  0.080748})));
}
TEST ( SgnnProjectionTest , TensorSgnnProjection ) { SgnnProjectionModel m ( { " " , " " , " " , " " , " " , " " , " " , " " , " " } , { 0 , 6 , 9 } , { 5 , 7 } , 0x7FFFFFFF ) ; EXPECT_THAT ( m . GetOutputShape ( ) , ElementsAre ( 2 , 2 ) ) ; EXPECT_THAT ( m . ExtractOutputValue ( ) , ElementsAreArray ( ArrayFloatNear ( { 0.448691 , -0.238499 , -0.037561 , 0.080748 } ) ) ) ; }
Keep same result of test_projection in sgnn_test.py
Keep same result of test_projection in sgnn_test . py
/*input_row_splits=*/ /*hash_seed=*/ /*buckets=*/