SNN2.src.model.layers.CURELayer.tf_cluster module
class module
Use this module to manage a class object.
- class SNN2.src.model.layers.CURELayer.tf_cluster.TfCluster(id: int, points: Tensor, n_rep: int = 5, dtype_pt: Type = tf.float32, compression_factor: float = 0.5, representors_subset: Tensor | None = None, tree: Index | None = None)
Bases:
objectTfCluster.
Manage a single tensorflow cluster instance
- property closest: int
- compute_representors(subset: Tensor) None
- property distance_closest: float
- dst(x: Self) float
- property id: int
- insert_into_tree() None
- property mean: Tensor
- classmethod merge(x: Self, y: Self) Self
- min_str() str
- nearest_from_tree(**kwargs) None
- property points: Tensor
- remove_from_tree() None
- property rep: Tensor
- property reverse_closests: List[Self]
- class SNN2.src.model.layers.CURELayer.tf_cluster.TfClusters(points: Tensor, n_rep: int = 5, compression_factor: float = 0.5, tree: Index | None = None)
Bases:
objectTfClusters.
Manage a queue of clusters
- apply_sort() None
- compute_closest() None
- pop()
- property size: int
- update_reverse_closest(c_id, new_closest_id) None
- SNN2.src.model.layers.CURELayer.tf_cluster.glob_dst(local: Tensor, remote: Tensor, local_repeater: Tensor, remote_repeater: Tensor) float