Open xiaojun-mbed opened 2 years ago
Hi @xiaojun-mbed
CppFlow provides a mapping of TF Raw Ops in cppflow/raw_ops.h
.
You can use the mapping of concat:
tensor concat(const tensor& concat_dim, const std::vector<tensor>&values)
Thank you very much for your help! I can't understand the source code. Can you tell me how to do this example
cppflow::tensor add = cppflow::concat(1, vector
It looks fine. You didn't post the error you getting so is hard to tell.
How do I connect two tensors?
std::vector vals1 = { 1.1, 1.2, 1.3, 1.4, 1.5, 1.6,1.7, 1.8, 1.9 };
std::vector vals2 = { 1.11, 1.21, 1.31, 1.41, 1.51, 1.61,1.71, 1.81, 1.91 };
cppflow::tensor t1 = cppflow::tensor(vals1, { 9,1 });
cppflow::tensor t2 = cppflow::tensor(vals2, { 9,1 });
Connect like this in the dimension of axis = 1 to form a tensor of shape dimension (9, 2)