Is it possible to do gradient domain l1 loss in pytorch

I’m kind of lost a little bit. Is it possible to do a High Frequency Error Norm (HFEN) in pytorch?