REQUIRE_TRUE(a->rankOf()>=2,0,"lstsq: The rank of input left tensor should not be less than 2, but %i is given",a->rankOf());
REQUIRE_TRUE(b->rankOf()>=2,0,"lstsq: The rank of input right tensor should not be less than 2, but %i is given",b->rankOf());
// REQUIRE_TRUE(a->sizeAt(-1) == a->sizeAt(-2), 0, "lstsq: The last two dimmensions should be equal, but %i and %i are given", a->sizeAt(-1), a->sizeAt(-2));
REQUIRE_TRUE(a->sizeAt(-2)==b->sizeAt(-2),0,"lstsq: The last dimmension of left part should be equal to prelast of right part, but %i and %i are given",a->sizeAt(-1),b->sizeAt(-2));
//REQUIRE_TRUE(l2_factor == 0., 0, "lstsq: Implementation of operation is not finished for factor difference from 0.");
REQUIRE_TRUE(a->rankOf()>=2,0,"lstsq: The rank of input left tensor should not be less than 2, but %i is given",a->rankOf());
REQUIRE_TRUE(b->rankOf()>=2,0,"lstsq: The rank of input right tensor should not be less than 2, but %i is given",b->rankOf());
// REQUIRE_TRUE(a->sizeAt(-1) == a->sizeAt(-2), 0, "lstsq: The last two dimmensions should be equal, but %i and %i are given", a->sizeAt(-1), a->sizeAt(-2));
REQUIRE_TRUE(a->sizeAt(-2)==b->sizeAt(-2),0,"lstsq: The last dimmension of left part should be equal to prelast of right part, but %i and %i are given",a->sizeAt(-1),b->sizeAt(-2));
//REQUIRE_TRUE(l2_factor == 0., 0, "lstsq: Implementation of operation is not finished for factor difference from 0.");