Example:
>>> import torch
>>> torch.hinge_embedding_loss
<built-in method hinge_embedding_loss of type object at 0x7ff9c8948d20>
Official docs tell you to use torch.nn.functional.hinge_embedding_loss and for good reason: the hinge_embedding_loss in torch exposes a reduction argument that is an int, not a string.
Example:
Official docs tell you to use
torch.nn.functional.hinge_embedding_lossand for good reason: thehinge_embedding_lossin torch exposes a reduction argument that is an int, not a string.