Added a buildTensor command to manager to simplify tensor creation workflows
This commit is contained in:
parent
dcd8340b27
commit
4171786b6f
5 changed files with 147 additions and 77 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue