Closed speedcell4 closed 2 years ago
I have seen some repositories initialize it as nn.init.zeros_
, not sure which one is better
Hi, there's no particular reason, to be honest. You can experiment with it yourself to see which one works best in your case.
Hi~ Why do you initialize the transition matrix in this way? Is it a theoretically optimal initialization method? Or it's just an empirical method?
https://github.com/kmkurn/pytorch-crf/blob/4cd79bc8af55fb0f34a2a39b2e38f0e71c208fd4/torchcrf/__init__.py#L50-L58