research/seq_flow_lite/models/sgnn/sgnn_projection_test.cc
// Constructor for testing the op with a tf.Tensor
Constructor for testing the op with a tf.Tensor
Constructor for testing the op with a tf . Tensor
SgnnProjectionModel(const std::vector<std::string>& input_values,
                      const std::vector<int64_t>& input_row_splits,
                      const std::vector<int64_t>& hash_seed, int64_t buckets) {
    input_values_index_ = AddInput(TensorType_STRING);
    input_row_splits_index_ = AddInput(TensorType_INT64);
    output_values_index_ = AddOutput(TensorType_FLOAT32);
    BuildCustomOp(hash_seed, buckets);
    BuildInterpreter({{static_cast<int>(input_values.size())},
                      {static_cast<int>(input_row_splits.size())}});
    PopulateStringTensor(input_values_index_, input_values);
    PopulateTensor(input_row_splits_index_, input_row_splits);
    Invoke();
  }
SgnnProjectionModel ( const std :: vector < std :: string > & input_values , const std :: vector < int64_t > & input_row_splits , const std :: vector < int64_t > & hash_seed , int64_t buckets ) { input_values_index_ = AddInput ( TensorType_STRING ) ; input_row_splits_index_ = AddInput ( TensorType_INT64 ) ; output_values_index_ = AddOutput ( TensorType_FLOAT32 ) ; BuildCustomOp ( hash_seed , buckets ) ; BuildInterpreter ( { { static_cast < int > ( input_values . size ( ) ) } , { static_cast < int > ( input_row_splits . size ( ) ) } } ) ; PopulateStringTensor ( input_values_index_ , input_values ) ; PopulateTensor ( input_row_splits_index_ , input_row_splits ) ; Invoke ( ) ; }
Constructor for testing the op with a tf.Tensor
Constructor for testing the op with a tf . Tensor