• Jeff Cai's avatar
    Parameterized criterions (#808) · ba5f829f
    Jeff Cai authored
    Summary:
    Support criterion with parameters, such as AutoSegmentationCriterion (ASG) used in wav2letter which has a transition matrix parameter. This is needed to integrate wav2letter's ASG into PySpeech.
    
    With this diff, parameters in criterions will be:
    (1) updated by optimizers, with a configurable learning rate
    (2) saved and loaded from checkpoints, preserving backward compatibility for criterions without parameters
    (3) synchronized across nodes in distributed training.
    Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/808
    
    Reviewed By: jcai1
    
    Differential Revision: D16934097
    
    Pulled By: okhonko
    
    fbshipit-source-id: 121ec9382459385c6f9cbef3a8274bec1a434038
    ba5f829f
sgd.py 1.33 KB