Advertisement
lskeeper

Untitled

Oct 17th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. TEST(NVDMPredictorTest, all) {
  2. std::vector<float> f;
  3. std::vector<std::vector<float>> input;
  4.  
  5. std::string text(
  6. "facebook be bold and move fast connect people around the "
  7. "world facebook");
  8.  
  9. std::vector<int> feature = featurizer->genFeature(text);
  10. for (const auto num : feature) {
  11. f.push_back(folly::to<float>(num));
  12. }
  13.  
  14. input.push_back(f);
  15. std::vector<std::vector<float>> res = nvdm->predict(input);
  16. EXPECT_EQ(10000, feature.size());
  17. EXPECT_EQ(1, res.size());
  18. EXPECT_EQ(400, res[0].size());
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement