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
Problem with: "indices = T.Placeholder((0,),'int32')", it works if it is replace with: "indices= T.Placeholder((batch_size,),'int32')
import symjax as sj
import symjax.tensor as T
import numpy as np
import scipy
import matplotlib.pyplot as plt
from sklearn.cluster.k_means_ import *
import scipy.sparse as sp
from sklearn.cluster.k_means_ import k_init
from sklearn.cluster.k_means import _kmeans_single_lloyd
from sklearn.cluster import MiniBatchKMeans
class RAI_KMeans:
def init(self,x_shape,n_data_train,n_data_test,batch_size,n_clusters,n_landmarks):
Problem with: "indices = T.Placeholder((0,),'int32')", it works if it is replace with: "indices= T.Placeholder((batch_size,),'int32')
import symjax as sj
import symjax.tensor as T
import numpy as np
import scipy
import matplotlib.pyplot as plt
from sklearn.cluster.k_means_ import *
import scipy.sparse as sp
from sklearn.cluster.k_means_ import k_init
from sklearn.cluster.k_means import _kmeans_single_lloyd
from sklearn.cluster import MiniBatchKMeans
class RAI_KMeans:
def init(self,x_shape,n_data_train,n_data_test,batch_size,n_clusters,n_landmarks):
data = sj.data.mnist()["train_set/images"].astype('float32')
x_shape = data.shape[1:]
n_data_train = data.shape[0]
batch_size = 10
ind_train = np.random.permutation(data.shape[0])[:batch_size].astype('int32')
print(x_shape)
data_train = data[ind_train]
test = RAI_KMeans(x_shape,n_data_train,10,batch_size,5,4)
image = test.get_data_aff(data_train,ind_train)
The text was updated successfully, but these errors were encountered: