Open amylmy opened 2 years ago
Have you figured this out? Was hoping to run this on colab, but downgrading sklearn takes a really long time.
In the tsne_torch_loss.py
file, you can modify the code for the error section as follows:
# compute the joint probability distribution for the input space
row_index = [i for i in range(distances_nn.shape[0]) for j in range(distances_nn.shape[1])]
col_index = [i for i in neighbors_nn.reshape(-1)]
distances_nn_ = sp.csr_matrix((distances_nn.reshape(-1), (row_index, col_index)),
shape=(distances_nn.shape[0], distances_nn.shape[0]))
P = _joint_probabilities_nn(distances_nn_, perplexity, verbose)
To verify the correctness of this modification, you can run the test_tsne_torch_loss.py
file located in the tests
directory.
Thanks for your excellent work. However, there are problems when I test with your code. In line 6
Should it be
from sklearn.manifold._t_sne
?This was successfully imported after changing
t_sne
to_t_sne
. However, the_joint_probabilities_nn
reported only taking 3 positional arguments, but 4 were given. And After I fixed this, another error occurred... Could you tell me how to solve this? Thanks.