Bihaqo / t3f

Tensor Train decomposition on TensorFlow
https://t3f.readthedocs.io/en/latest/index.html
MIT License
218 stars 56 forks source link

t3f.round() does not support epsilon #202

Open aiboyko opened 4 years ago

aiboyko commented 4 years ago

As opposed to TT-Toolbox and TTPY package, round() with a given epsilon, does not actually lead to a reduction of the rank for a function it is supposed to work with.

I tested on np.exp(-x*y) function projected on a uniform grid. In ttpy, this function has rank=8 if eps=1e-14, and rank=3 if eps=1e-3 .

However, when I create t3f TT using: T3FZ = t3f.to_tt_tensor(Z)

it automatically leads to rank=10. After t3f.round(tt=T3FZ, eps=1e-3) rank is still 10.

Having to convert t3f TT on GPU intro ttpy TT just to be able to do rounding with a given EPS is not convenient, could you please fix the round() function?

Bihaqo commented 4 years ago

Oh, yes, epsilon is not supported (you're the first one to need it).

I can do it, but probably not this week. You're welcome to to it yourself though, I can help :)