MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ValidateAssets

Method ValidateAssets

tensorflow/cc/saved_model/loader_test.cc:53–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 void ValidateAssets(const string& export_dir,
54 const SavedModelBundle& bundle) {
55 const string asset_directory =
56 io::JoinPath(export_dir, kSavedModelAssetsDirectory);
57 const string asset_filename = "foo.txt";
58 const string asset_filepath = io::JoinPath(asset_directory, asset_filename);
59 TF_EXPECT_OK(Env::Default()->FileExists(asset_filepath));
60
61 std::vector<Tensor> path_outputs;
62 TF_ASSERT_OK(
63 bundle.session->Run({}, {"filename_tensor:0"}, {}, &path_outputs));
64 ASSERT_EQ(1, path_outputs.size());
65
66 test::ExpectTensorEqual<tstring>(
67 test::AsTensor<tstring>({"foo.txt"}, TensorShape({})), path_outputs[0]);
68 }
69
70 void CheckSavedModelBundle(const string& export_dir,
71 const SavedModelBundle& bundle) {

Callers

nothing calls this directly

Calls 6

DefaultFunction · 0.85
JoinPathFunction · 0.50
TensorShapeClass · 0.50
FileExistsMethod · 0.45
RunMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected