From 746d26f0f75e76192febe65fa673cca6e84b9f37 Mon Sep 17 00:00:00 2001 From: kapoorlab Date: Mon, 4 Dec 2023 18:55:31 +0100 Subject: [PATCH] handle negative eigenvalues --- src/napatrackmater/Trackmate.py | 3 ++- src/napatrackmater/clustering.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/napatrackmater/Trackmate.py b/src/napatrackmater/Trackmate.py index 8de79810..74a104e9 100644 --- a/src/napatrackmater/Trackmate.py +++ b/src/napatrackmater/Trackmate.py @@ -14,7 +14,7 @@ from pathlib import Path import concurrent from .clustering import Clustering - +from lightning import Trainer class TrackMate: def __init__( @@ -59,6 +59,7 @@ def __init__( self.center = center self.compute_with_autoencoder = compute_with_autoencoder self.latent_features = latent_features + self.pretrainer = Trainer(accelerator=self.accelerator, devices=self.devices) if image is not None: self.image = image.astype(np.uint8) else: diff --git a/src/napatrackmater/clustering.py b/src/napatrackmater/clustering.py index 23d8a5f8..2636a518 100644 --- a/src/napatrackmater/clustering.py +++ b/src/napatrackmater/clustering.py @@ -174,7 +174,6 @@ def _latent_computer(self, i, dim): def _create_cluster_labels(self): ndim = len(self.label_image.shape) - self.pretrainer = Trainer(accelerator=self.accelerator, devices=self.devices) if ndim == 2: labels, centroids, clouds, marching_cube_points = _label_cluster(