Skip to content
Snippets Groups Projects
Commit cb0748a7 authored by Christophe Guillon's avatar Christophe Guillon Committed by Maxence Naud
Browse files

[Tensor] Disambiguate undefined Tensor dimensions from Scalar Tensor

Define a Tensor with undefined dims by explicitly setting mSize to 0.
Provide undefined() method which must be used instead of empty()
to test whether a Tensor as associated dimensions and can be used
for forwarding dimensions downward.
This disambiguates from defined scalar Tensor which actually have
empty dimensions, but size of 1.
Note that as soon as a Tensor with undefined dimensions is resized,
it's dimensions are permanently defined (though may still change).

This change solves issues in operators forwardDims() when
input values are scalar, i.e. !undefined() and empty().
parent 8119458c
No related branches found
No related tags found
Loading
Loading
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