Closed ghost closed 2 years ago
Now I do this and see what happens
void test_cppflow()
{
std::vector
for(size_t i = 0; i < 1000000; i++)
{
cppflow::tensor t(data,shape);
}
}
int main(int argc, char * argv) { TF_Tensor t;
std::vector<int64_t> shape = {256,256};
for(size_t i = 0; i < 1000000; i++)
{
TF_Tensor * t = TF_AllocateTensor(TF_FLOAT, shape.data(), shape.size(), 256*256);
TF_DeleteTensor(t);
}
}
Ok, cppflow pass the test. I have to now determine if garbage collector needs to be cycled. Sorry.
Tensorflow still slow as balls though.
Ok, run this code and see if it gets killed/out of memory for you.
include <cppflow/tensor.h>
include
include
int main(int argc, char*argv) { std::vector shape = {256,256};
std::vector data;
data.resize(256 256);
}