Facts and Dimensions¶
- class tract.fact.InferenceFact(ptr)[source]¶
Tract inference fact, to be used with InferenceModel.
It can represent partial type and shape information of a Tensor during model analysis.
- class tract.fact.Fact(ptr)[source]¶
Tract-core fact, to be used with Model.
It always contains the full shape (sometimes using symbolic dimensions) and item type. In some situation it can also contain the constant value of the associated tensor.
- class tract.dim.Dim(ptr)[source]¶
A possibly symbolic dimension of a tensor.
Dimensions can be concrete integers or symbolic expressions (e.g.
N,N+1). Useto_int64()to extract a concrete value, oreval()to substitute symbols.