You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
%%time
import numpy as np
from MulticoreTSNE import MulticoreTSNE as TSNE
from matplotlib import pyplot as plt
if __name__ == "__main__":
data=np.load("/DATA1/zhangjingxiao/yxk/dataset/mnist/mnist.npz")
for item in data.files:
print(item)# find keys,the you can get value
print(data[item].shape)
print("=================")
## follow this
X=data["x_train"].reshape(60000,-1)
y=data["y_train"]
print(X.shape)
embeddings=TSNE(n_jobs=8).fit_transform(X)
vis_x=embeddings[:,0]
vis_y=embeddings[:,1]
plt.scatter(vis_x,vis_y,c=y)
plt.show()
my result is
my test code of TSNE in sklearn is
%%time
import numpy as np
from sklearn.manifold import TSNE
#from MulticoreTSNE import MulticoreTSNE as TSNE
from matplotlib import pyplot as plt
data=np.load("/DATA1/zhangjingxiao/yxk/dataset/mnist/mnist.npz")
for item in data.files:
print(item)# find keys,the you can get value
print(data[item].shape)
print("=================")
## follow this
X=data["x_train"].reshape(60000,-1)
y=data["y_train"]
print(X.shape)
tsne = TSNE(n_components=2, init='pca', random_state=0)
embeddings= tsne.fit_transform(X)
vis_x=embeddings[:,0]
vis_y=embeddings[:,1]
plt.scatter(vis_x,vis_y,c=y)
plt.show()
my result is below
It seems that mutlticore-tsne didnt speed up my experiment? Could you give me some advice about it ? Thank you
The text was updated successfully, but these errors were encountered:
my test code of Multicore-TSNE is below
my result is
my test code of TSNE in sklearn is
my result is below
It seems that mutlticore-tsne didnt speed up my experiment? Could you give me some advice about it ? Thank you
The text was updated successfully, but these errors were encountered: