Skip to content
Snippets Groups Projects
Commit be542e87 authored by Michal Szczepanski's avatar Michal Szczepanski
Browse files

bug fixed with casting

parent 3856a746
No related branches found
No related tags found
1 merge request!155[Add] Resize Operator unit-tests
...@@ -75,10 +75,11 @@ bool Aidge::Resize_Op::forwardDims(bool allowDataDependency) { ...@@ -75,10 +75,11 @@ bool Aidge::Resize_Op::forwardDims(bool allowDataDependency) {
for (std::size_t dim=0; dim < getInput(2)->size(); ++dim) { for (std::size_t dim=0; dim < getInput(2)->size(); ++dim) {
float scale = static_cast<float*>(scales.getImpl()->hostPtr())[dim]; float scale = static_cast<float*>(scales.getImpl()->hostPtr())[dim];
outDims[dim] = inDims[dim] * static_cast<int64_t>(scale); fmt::print("scale {} = {} \n",dim, scale);
outDims[dim] = static_cast<int64_t>(inDims[dim] * scale);
// outDims[dim] = inDims[dim]*static_cast<int64_t*>(scales.getImpl()->hostPtr())[dim]; // outDims[dim] = inDims[dim]*static_cast<int64_t*>(scales.getImpl()->hostPtr())[dim];
} }
fmt::print("OutDims = {} \n", outDims);
mOutputs[0]->resize(outDims); mOutputs[0]->resize(outDims);
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment