tensor: use canonicalize_shape in flatten
This commit is contained in:
@@ -871,8 +871,7 @@ if(is_flat())
|
|||||||
if(has_symmetry()) //get rid of formal symemtry
|
if(has_symmetry()) //get rid of formal symemtry
|
||||||
{
|
{
|
||||||
Tensor<T> r(*this);
|
Tensor<T> r(*this);
|
||||||
r.shape.copyonwrite();
|
r.canonicalize_shape();
|
||||||
for(int g=0; g<r.shape.size(); ++g) r.shape[g].symmetry=0;
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user