Created by: gbstack
Add stargan-v2 style FID calculation. For stargan-v2 FID calculation, we will use an Inception-V3 model weight converted from official torchvision implementation (I have uploaded it to AIStudio: https://aistudio.baidu.com/aistudio/datasetdetail/51890). Note that the original Inception model weights is converted from an unofficial tensorflow model, and generate different result compared to the torchvision one.
add --style command line option to let user choose stargan or gan-compression style (by default gan-compression style will be used).
move with fluid.dygraph.guard()
call into fid module for two reason: 1. this inference model didn't work in dygraph mode because it's not dynamic graph model and thus it's faster, so we dynamically choose whether to use dygraph mode after style is determined. (for gan-compression style, the original dygraph version model is used. And for stargan style, this new inference model will be used) 2. easier to use for end user (no need to call fluid.dygraph.guard()
explicitly)