brain-research / self-attention-gan

Apache License 2.0
1k stars 174 forks source link

Is there a way to test the trained model on image files rather than TF record? #7

Closed prash030 closed 6 years ago

prash030 commented 6 years ago

I have trained the model using your code and I have the checkpoints saved (I ran it for 300 epochs). How can I evaluate on image files (.png) that I have in ./data folder?

Thanks in advance.

DoctorTeeth commented 6 years ago

This isn't a setting that's built in, but it shouldn't be too hard to achieve.

You could either a) pack your images into tfrecords, which should only be like 15 lines of code or b) modify the existing code to accept png files (or numpy arrays or whatever)

In general, the reason for using tfrecords is that evaluating the FID uses a lot of memory, and so we need some way to do evaluation incrementally, and the tfrecord api gives us this for free.