@@ -360,33 +360,11 @@ def save_image_outputs(self, X_test: np.array, y_test: np.array, y_pred: np.arra
360360 total_images = min (len (y_pred ), samples_to_save )
361361
362362 for i in random .sample (range (len (y_pred )), total_images ):
363- newimg = self .concat_images ([X_test [i ], y_test [i ], y_pred [i ]])
363+ newimg = self .__concat_images ([X_test [i ], y_test [i ], y_pred [i ]])
364364 imgplot = explorer .show_image (newimg , silent_mode = True )
365365 self .__current_run .log_image (f'Image combo sample { i } ' , plot = imgplot )
366366 imgplot .close ()
367367
368- # def save_image_outputs(self, X_test: np.array, y_test: np.array, y_pred: np.array, samples_to_save: int = 1) -> np.array:
369-
370- # '''
371- # Will save image outputs to the run
372- # Args:
373- # X_test (np.array): The input images for the model
374- # y_test (np.array): The actual expected output images of the model
375- # y_pred (np.array): The predicted or calculated output images of the model
376- # samples_to_save (int): If greather than 0, this amount of input, output and generated image combinations will be tracked to the Run
377- # '''
378-
379- # if samples_to_save > 0:
380- # # Take incorrect classified images and save
381- # import random
382- # total_images = min(len(y_pred), samples_to_save)
383-
384- # for i in random.sample(range(len(y_pred)), total_images):
385- # groupplot = explorer.visualize({'Charts': [X_test[i]], 'Actuals': [y_test[i]], 'Calculated': [y_pred[i]]}, 1, grid_size=(6, 6), silent_mode=True)
386- # image = X_test[i].reshape(X_test.shape[1], X_test.shape[2])
387- # imgplot = explorer.show_image(image, silent_mode=True)
388- # self.__current_run.log_image(f'Sample {i:02d} / {total_images:02d}', plot=groupplot)
389-
390368 def setup_training (self , training_name : str , overwrite : bool = False ):
391369 '''
392370 Will initialize a new directory (using the given training_name) and add a training script and requirements file to run training
0 commit comments