Questions tagged [triplet]
63 questions
39
votes
5 answers
STL-pair-like triplet class - do I roll my own?
I want to use a triplet class, as similar as possible to std::pair. STL doesn't seem to have one. I don't want to use something too heavy, like Boost. Is there some useful FOSS non-restrictive-license triplet class I could lift from somewhere?…

einpoklum
- 118,144
- 57
- 340
- 684
10
votes
4 answers
How can I query rustc for the host triple?
When working with gcc, I can get what gcc thinks is my host's triplet by running gcc -dumpmachine. On my current system, this gives me x86_64-linux-gnu.
How can I get stable rustc to print my host triple? (x86_64-unknown-linux-gnu in this…

Tenders McChiken
- 1,216
- 13
- 21
9
votes
2 answers
Convert an Eigen matrix to Triplet form C++
I think Eigen uses compressed methods to store sparse matrices. Is there any way that I can extract Triplet-format vectors of an Eigen sparse matrix in from of std::vectors?
Thanks.
More info (an example of triplet format)
Triplet format of matrix :…

Sina J
- 193
- 1
- 4
6
votes
1 answer
Evaluating (model.evaluate) with a triplet loss Siamese neural network model - tensorflow
I have trained a Siamese neural network that uses triplet loss. It was a pain, but I think I managed to do it. However, I am struggling to understand how to make evaluations with this model.
The SNN:
def triplet_loss(y_true, y_pred):
margin =…

maxipod
- 79
- 6
6
votes
2 answers
How to determine accuracy with triplet loss in a convolutional neural network
A Triplet network (inspired by "Siamese network") is comprised of 3 instances of the same feed-forward network (with shared parameters). When fed with 3 samples, the network outputs 2 intermediate values - the L2 (Euclidean) distances between the…

Hello Lili
- 1,527
- 1
- 25
- 50
5
votes
0 answers
Keras: triplet loss with positive and negative sample within batch
I try to refactor my Keras code to use 'Batch Hard' sampling for the triplets, as proposed in https://arxiv.org/pdf/1703.07737.pdf.
" the core idea is to form batches by randomly sampling P classes
(person identities), and then randomly sampling…

Derk
- 1,385
- 3
- 19
- 38
4
votes
1 answer
How to implement a filter in tensorflow?
I have a convolutional neural network with three images as inputs:
x_anchor = tf.placeholder('float', [None, 4900], name='x_anchor')
x_positive = tf.placeholder('float', [None, 4900], name='x_positive')
x_negative = tf.placeholder('float', [None,…

Hello Lili
- 1,527
- 1
- 25
- 50
3
votes
1 answer
How to implement A = sparse(I, J, K) (sparse matrix from triplet) in a Fortran mex file?
I'm trying to create a sparse square matrix in Matlab through a mex function (written in Fortran). I want something like A = sparse(I,J,K) . My triplets look like this, there are repetitions among the entries
femi = [1, 2, 3, 2, 2, 4, 5, 5, 4, 6, 6,…

Kadiya
- 63
- 1
- 6
3
votes
0 answers
Triplet Network, loss function and equal distances
I'm currently implementing a triplet network to recognise if two images are describing the same 3d-model or not, but I have some problems with the results, the distances between anchor-positive is always equal to the distance between…

Tbertin
- 635
- 7
- 21
2
votes
0 answers
Reshape data obtained using TriMatch package in R to another data keeping matched triplets serial ID for further analysis
How can I reshape data A (obtained using TriMatch package in R) to data B and keep matched triplets serial ID to allow further analysis?
Used code to get data A and its structure:
formu <- ~ Age+FEMALE+renal_insuf+Diabetes+MI+LVEF_pre+ Crea+…

Mohamed Rahouma
- 1,084
- 9
- 20
2
votes
0 answers
Could someone explain me what's behind the FaceNet Paper ? (one-shot learning, siamese network and triplet loss)
I'm struggling since about 3 weeks on my One-Shot learning project. I'm trying to unlock my computer with my face. Unfortunately, I'm far from this task.
First, I wanted to understand well the concepts behind one-shot learning and especially triplet…

ThOpaque
- 39
- 6
2
votes
1 answer
Loss nan for triplet loss Tensorflow
I'm trying to train a triplet loss model in TensorFlow (tensorflow==1.13.1) but the loss goes to NAN after the first iteration. I already read a lot of tips from this forum but nothing has worked so far. Smaller learning rate (changed 0.01 to…

Andreas Verschuere
- 21
- 1
2
votes
0 answers
How to deal with triplet loss when at time of input I have only a json file of ID with 512 dimensonal vector?
I have a file json with vectors generated from InsightFace with MXNet like this:
{"id": "huonght", "vector": "[-0.0591206625,-0.0562381446,...,0.0173285864,0.0403193906]}
{"id": "huonght", "vector":…

Phạm Minh Huy
- 21
- 1
2
votes
0 answers
Not able to train Resnet model with tripletloss, while VGG16 works, why?
I am trying to do a transfer learning with ResNet50V2 model using triplet loss function. I have kept Include_top = False, input shape = (160,160,3) with Imagenet weights. The last 3 layers of my model is shown in the below image with 6 million…

Soma Sundaram
- 63
- 7
2
votes
2 answers
Find unique triplets
In my function I have to find all unique triplets to given numbers K from given array. It finds all triplets but many of them are there twice or more like 1 1 5 is same as 1 5 1 or 5 1 1 and etc.
Can somebody help me with this?
int triplet(int…

blackroad
- 29
- 1
- 5