diff --git a/fedot_ind/core/models/detection/anomaly/algorithms/convolutional_autoencoder_detector.py b/fedot_ind/core/models/detection/anomaly/algorithms/convolutional_autoencoder_detector.py index 006561ae7..e9621d864 100644 --- a/fedot_ind/core/models/detection/anomaly/algorithms/convolutional_autoencoder_detector.py +++ b/fedot_ind/core/models/detection/anomaly/algorithms/convolutional_autoencoder_detector.py @@ -74,9 +74,9 @@ def _build_decoder(self): out_channels = 32 decoder_layer_dict.update({f'conv{i}': - ConvTranspose1d(in_channels=in_channels, - out_channels=out_channels, - output_padding=1, **self.convolutional_params)}) + ConvTranspose1d(in_channels=in_channels, + out_channels=out_channels, + output_padding=1, **self.convolutional_params)}) decoder_layer_dict.update({f'relu{i}': self.activation_func()}) in_channels = out_channels self.decoder = Sequential(decoder_layer_dict) @@ -110,7 +110,7 @@ def fit(self, self._init_model() train_loader, valid_loader = self._create_dataloader(data, batch_size, validation_split) train_steps, early_stopping, best_model, best_val_loss = max(1, len(train_loader)), EarlyStopping(), \ - None, float('inf') + None, float('inf') scheduler = lr_scheduler.OneCycleLR(optimizer=self.optimizer, steps_per_epoch=train_steps, epochs=epochs, @@ -132,7 +132,6 @@ def val_one_epoch(batch): return loss.data.item() * inputs.size(0) for epoch in tqdm(range(epochs)): - iter_count = 0 self.train() train_loss = list(map(lambda batch_tuple: train_one_batch(batch_tuple), train_loader)) train_loss = np.average(train_loss) diff --git a/fedot_ind/core/tuning/search_space.py b/fedot_ind/core/tuning/search_space.py index e26dcbe19..ac46cc740 100644 --- a/fedot_ind/core/tuning/search_space.py +++ b/fedot_ind/core/tuning/search_space.py @@ -99,7 +99,7 @@ "n_seasonality_blocks": {'hyperopt-dist': hp.choice, 'sampling-scope': [[x for x in range(1, 4, 1)]]}, "n_of_harmonics": {'hyperopt-dist': hp.choice, 'sampling-scope': [[x for x in range(1, 3, 1)]]}}, 'bagging': {'method': - {'hyperopt-dist': hp.choice, 'sampling-scope': [['max', 'min', 'mean', 'median']]}}, + {'hyperopt-dist': hp.choice, 'sampling-scope': [['max', 'min', 'mean', 'median']]}}, 'stat_detector': {'anomaly_thr': {'hyperopt-dist': hp.choice, 'sampling-scope': [list(np.arange(0.75, 0.99, 0.05))]}, 'window_length': {'hyperopt-dist': hp.choice,