I think I can write it using pytorch operators. The loss is the sum of binary cross entropy and a regularization term which includes matrix norm and a pytorch operator is available for matrix norm.
My doubt is how can in code that ?
Like for usual binary cross entropy I did this
lossfn = nn.BCELoss()
lossfn(y_pred,y_true)
loss.backward()
The loss given in the paper  is
Bceloss + matrix norm.
So how should I write that ?
How can I specify inputs to the loss