Skip to content
Snippets Groups Projects
Commit 93c0843e authored by Nathan Thoumine's avatar Nathan Thoumine
Browse files

Add assertion for the number of dimensions

parent 01ad947e
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ public:
, _prefix(prefix)
{
_dims.nbDims = dims.size()+1; //The number of dimensions. Max 8.
assert(_dims.nbDims <= 8 && "The maximum number of dimensions supported for a tensor is 8");
_dims.d[0] = batchSize; //Batch Size
for(std::size_t i = 0; i < _dims.nbDims-1; ++i) _dims.d[i+1] = dims[i];
......
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