def calculate_ls_loss(self, user, item, target):
    'Calculate label smoothness loss.\n\n        Args:\n            user(torch.FloatTensor): the index of users, shape: [batch_size*2],\n            item(torch.FloatTensor): the index of items, shape: [batch_size*2],\n            target(torch.FloatTensor): the label of user-item, shape: [batch_size*2],\n\n        Returns:\n            ls_loss: label smoothness loss\n        '
    user_e = self.user_embedding(user)
    (entities, relations) = self.get_neighbors(item)
    predicted_labels = self.label_smoothness_predict(user_e, user, entities, relations)
    ls_loss = self.bce_loss(predicted_labels, target)
    return ls_loss
Calculate label smoothness loss.

Args:
    user(torch.FloatTensor): the index of users, shape: [batch_size*2],
    item(torch.FloatTensor): the index of items, shape: [batch_size*2],
    target(torch.FloatTensor): the label of user-item, shape: [batch_size*2],

Returns:
    ls_loss: label smoothness loss
def calculate_ls_loss(self, user, item, target):
    'Calculate label smoothness loss.\n\n        Args:\n            user(torch.FloatTensor): the index of users, shape: [batch_size*2],\n            item(torch.FloatTensor): the index of items, shape: [batch_size*2],\n            target(torch.FloatTensor): the label of user-item, shape: [batch_size*2],\n\n        Returns:\n            ls_loss: label smoothness loss\n        '
    user_e = self.user_embedding(user)
    (entities, relations) = self.get_neighbors(item)
    predicted_labels = self.label_smoothness_predict(user_e, user, entities, relations)
    ls_loss = self.bce_loss(predicted_labels, target)
    return ls_loss