michaal94 / torch_DCEC

Pytorch Deep Clustering with Convolutional Autoencoders implementation
MIT License
98 stars 30 forks source link

Inference #5

Open ghost opened 4 years ago

ghost commented 4 years ago

How do I run inference with a custom model and custom dataset, where the input is a folder of images, and the output is folders with 1 cluster per folder?

michaal94 commented 4 years ago

You can use calculate_predictions() function from training_functions.py. You can modify torch_DCEC.py to do that. Switch last lines to use calculate_predictions() on the loaded model and dataloader.

ghost commented 4 years ago

Oh could please list the line which I need to delete? I'm not sure if I'm deleting the wrong lines. Also, for me, after pretraining, my program at first uses 100% cpu, but then drops to no utilization. Is the pretraining model okay for inference?