How to use CRF in Pytorch

I want to convert the following keras code to pytorch:

crf_layer = CRF(units=TAG_COUNT)
output_layer = crf_layer(model)

I was trying the following:
crf_layer = self.crf()
output_layer = crf_layer(x)

But I am getting the following error:
crf_layer = self.crf()
*** TypeError: forward() missing 2 required positional arguments: ‘emissions’ and ‘tags’