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
{{ message }}
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
When I run the script with facebookresearch's fasttext, it cannot acommodate it.
But the sample script seems to work well.
On this line of the example script: cp = snn.ClusterIndex(feat, data_to_return)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-14-61d2fb78a7b1> in <module>()
----> 1 cp = snn.ClusterIndex(feat, data_to_return)
/home/jung4351/pysparnn/pysparnn/cluster_pruning.py in __init__(self, sparse_features, records_data, distance_type, matrix_size, parent)
144 records_index = np.arange(sparse_features.shape[0])
145 clusters_size = min(self.matrix_size, num_records)
--> 146 clusters_selection = random.sample(records_index, clusters_size)
147 clusters_selection = sparse_features[clusters_selection]
148
/usr/lib/python3.4/random.py in sample(self, population, k)
309 population = tuple(population)
310 if not isinstance(population, _Sequence):
--> 311 raise TypeError("Population must be a sequence or set. For dicts, use list(d).")
312 randbelow = self._randbelow
313 n = len(population)
TypeError: Population must be a sequence or set. For dicts, use list(d).
The text was updated successfully, but these errors were encountered:
Hi @younghj ! Could you please povide me a little more information? What data file are you referencing and how are your constructing the 'feat' variable?
When I run the script with facebookresearch's fasttext, it cannot acommodate it.
But the sample script seems to work well.
On this line of the example script:
cp = snn.ClusterIndex(feat, data_to_return)
The text was updated successfully, but these errors were encountered: