Bihaqo / t3f

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

TF 2.2 support: tt_rank as float (matrix/tensor_ones/zeros) #211

Closed towadroid closed 3 years ago

towadroid commented 4 years ago

Using TF 2.2.0 the functions matrix_ones and matrix_zeros (edit: same for tensor_ones and tensor_zeros ) fail because the tt_ranks (l.185 and l.227) are floats and TF does not accept floats anymore. An easy fix is to add dtype=int to the respective statements.

However more parts of the code may be affected. This may also be related to #205 as the functions mentioned above still work fine with TF 2.0.0.

Bihaqo commented 4 years ago

Thank you, I'll take a look

On Thu, 9 Jul 2020 at 11:12, towadroid notifications@github.com wrote:

Using TF 2.2.0 the functions matrix_ones and matrix_zeros fail because the tt_ranks (l.185 and l.227) are floats and TF does not accept floats anymore. An easy fix is to add dtype=int to the respective statements.

However more parts of the code may be affected. This may also be related to #205 https://github.com/Bihaqo/t3f/issues/205 as the functions mentioned above still work fine with TF 2.0.0.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Bihaqo/t3f/issues/211, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK6V2OF7FYLLOMVZ6VONOLR2WJY5ANCNFSM4OVOH7FA .

Bihaqo commented 3 years ago

Sorry it took me so insanely long. Looking into it right now though.

Your fix seems to work (#214): it passes tests locally (but fails on travis with a weird C level error). I jumped immediately to TF 2.4. because apparently everything older than that has security vulnerabilities.