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

Method WriteAndReadBack

tensorflow/lite/testing/tf_driver_test.cc:32–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 // No need for a full TfDriver. We just want to test the read/write methods.
31 TestDriver() : TfDriver({}, {}, {}, {}) {}
32 string WriteAndReadBack(tensorflow::DataType type,
33 const std::vector<int64_t>& shape,
34 const string& values) {
35 tensorflow::Tensor t = {
36 type,
37 tensorflow::TensorShape{tensorflow::gtl::ArraySlice<tensorflow::int64>{
38 reinterpret_cast<const tensorflow::int64*>(shape.data()),
39 shape.size()}}};
40 SetInput(values, &t);
41 return ReadOutput(t);
42 }
43};
44
45TEST(TfDriverTest, ReadingAndWrintingValues) {

Callers 1

TESTFunction · 0.80

Calls 3

SetInputFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected