The second parameter of the min function can hit anneal_cap before update_count can reach args.total_anneal_steps. If I understood the logic correctly based on variable naming, it should take args.total_anneal_steps for the anneal variable to go from 0 to anneal_cap in a linear fashion.
https://github.com/younggyoseo/vae-cf-pytorch/blob/3619878f8eaf77f4018be697f1ecfdbd95f9a23b/main.py#L114-L115
The second parameter of the min function can hit
anneal_cap
beforeupdate_count
can reachargs.total_anneal_steps
. If I understood the logic correctly based on variable naming, it should takeargs.total_anneal_steps
for theanneal
variable to go from 0 toanneal_cap
in a linear fashion.The proposed solution is to do the following:
If this is the case I would be happy to open a pull request to fix this.