Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensor 3.0.5 ( multiply strange behavior) #46

Open
EDPSH opened this issue Apr 22, 2024 · 1 comment
Open

Tensor 3.0.5 ( multiply strange behavior) #46

EDPSH opened this issue Apr 22, 2024 · 1 comment

Comments

@EDPSH
Copy link

EDPSH commented Apr 22, 2024

My concerns starts with tensor 3.0.5, I talked about it again and my example is T-SNE.
PHP 8.2.17 (x64)... tensor 3.0.5...
When the tensor 3.0.5 is enabled, then the results for the tsne.php and specific at line 332 of page code

$p = Matrix::quick($this->affinities($distances))
->multiply($this->exaggeration);

produce all zeros for $p

The example is with dataset iris-flower

Tensor Enabled - results
Tensor\Matrix Object
(
[a:protected] => Array
(
[0] => Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
......

But if i disabled Tensor 3.0.5

then the results are as this ...

Tensor Disabled - results
Tensor\Matrix Object
(
[a:protected] => Array
(
[0] => Array
(
[0] => 0
[1] => 0.21491825237444
[2] => 0.22478852033193
[3] => 0.18097129837837
[4] => 0.40076888328063
[5] => 0.19018111784135
[6] => 0.22138822172434
[7] => 0.38127063420594
[8] => 0.11774974442454
........

the: $this->affinities($distances) has values
the: $this->exaggeration has values
but when put them together with tensor enabled, the results are all zero.

@andrewdalpino
Copy link
Member

Interesting @EDPSH thank you for the fantastic writeup!

It sounds like there's a problem with the multiplyScalar() method or perhaps even the universal method multiply() that calls multiplyScalar() under the hood.

Digging deeper ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants