    _lossfunc = dml.losses.TripletMarginLoss(
        margin=configs.triplet.margin_euclidean,
        reducer=dml.reducers.ThresholdReducer(low=0.),
        distance=dml.distances.LpDistance(
            p=2, power=1, normalize_embeddings=True)
    )
    _miner = dml.miners.TripletMarginMiner(
        margin=configs.triplet.margin_euclidean,
        type_of_triplets='semihard')