Helper Module for Deep Learning.
Deep Clustering for Unsupervised Learning of Visual Features.
-
class
pynet.models.deepcluster.DeepCluster(network, clustering, data_loader, n_batchs, pca_dim=256, assignment_logfile=None, use_cuda=False)[source]¶ Deep Clustering for Unsupervised Learning of Visual Features.
-
__init__(network, clustering, data_loader, n_batchs, pca_dim=256, assignment_logfile=None, use_cuda=False)[source]¶ Init class.
- Parameters
network: @callable
the network used to compute the features.
clustering: @callable
the clustering algorithm.
data_loader: DataLoader
the train data loader.
n_batchs: int
the number of batchs used to computes network features.
pca_dim: int, default 256
the dimension of input clustering features.
assignment_logfile: str, default None
save the cluster assignements at each epoch.
use_cuda: bool, default False
wether to use GPU or CPU.
-
cluster(features)[source]¶ Performs the clustering.
- Parameters
features: array (N, ndim)
network features to preprocess.
- Returns
labels: array (N, )
the predicted class assignments.
-
compute_features()[source]¶ Compute the network features.
- Returns
features: array (N, ndim)
network features.
-
Follow us
Inspired by AZMIND template.