Added a buildTensor command to manager to simplify tensor creation workflows

This commit is contained in:
Alejandro Saucedo 2020-09-10 08:35:27 +01:00
parent dcd8340b27
commit 4171786b6f
5 changed files with 147 additions and 77 deletions

View file

@ -100,6 +100,9 @@ Tensor::isInit()
void
Tensor::setData(const std::vector<float>& data)
{
if (data.size() != this->mData.size()) {
throw std::runtime_error("Kompute Tensor Cannot set data of different sizes");
}
this->mData = data;
}