kmkurn / pytorch-crf

(Linear-chain) Conditional random field in PyTorch.
https://pytorch-crf.readthedocs.io
MIT License
938 stars 151 forks source link

Add `size_average` argument in `forward` #10

Closed kmkurn closed 5 years ago

kmkurn commented 6 years ago

This is to follow Pytorch's convention. When reduce is True, size_average being True means to average the log likelihood over the batch, but sum them otherwise. When reduce is False, size_average is ignored.

kmkurn commented 5 years ago

This argument seems to be deprecated in PyTorch 0.4 in favor of reduction. Closing this issue.