Closed bochuanwu closed 4 years ago
have you simply combine all the loss together? such as loss = [triplet(f, target) for f in feat] loss = sum(loss) / len(loss)
or loss with weight? my loss value can not reduce during trainig process.
Triplet loss easily meets gradient explosion because of space sparsity in training samples and gradient clipping helps to relieve this problem if you want to use Triplet loss during the whole training process. In my implementation, loss = cross_entropy in first 10 epochs and even epoch. In singular epoch, loss = cross_entropy + 0.14*triplet_loss.
have you simply combine all the loss together? such as loss = [triplet(f, target) for f in feat] loss = sum(loss) / len(loss) or loss with weight? my loss value can not reduce during trainig process.
Triplet loss easily meets gradient explosion because of space sparsity in training samples and gradient clipping helps to relieve this problem if you want to use Triplet loss during the whole training process. In my implementation, loss = cross_entropy in first 10 epochs and even epoch. In singular epoch, loss = cross_entropy + 0.14*triplet_loss.
great! thank you for your help
have you simply combine all the loss together? such as loss = [triplet(f, target) for f in feat] loss = sum(loss) / len(loss)
or loss with weight? my loss value can not reduce during trainig process.