Hello.
I want to detect the fabric defect using autoencoder.
Actually, data size is too small to do ML, so I cropped images to patches.
number of nodefect images: 85
number of patch of a image: 172
Then I trained the autoencoder.
During training time, loss is computed for every patches, maybe # of losses are (num_epoch * # of images * # of patches).
<loss_torch = np.empty((1, num_epoch, 85, 172)) > with this code, I made the np place for losses, then convert to tensor.
During test time, if computed loss (for every patch) > threshold then the image to which this patch belongs will be detected as a defect.
As I divided image into patches and trained Autoencoder, I called Dataloader with (# of batches = 1).
Then I wonder how I can draw a graph that reduces loss as the epoch progresses.
Also, I wonder if I stop training with the status that has [1, # of epochs, # of images, # of patches] shape of losses, and then do model.eval(), proceed with the model evaluation(validate).
Thank you for reading long sentences.