Skip to content

Clarification on Neural Network Architecture with TrainWithClassifier Class #655

Discussion options

You must be logged in to vote

During both training and testing, the neural network just sees a batch of images. For each image, the neural network computes an embedding, independently of all the other images. You could have a batch size of 1, and the neural network wouldn't know the difference.

The triplet construction happens only to compute the loss value during training. Given the embeddings of a batch, the loss function is calculated by comparing the distances between anchor embedding, positive embedding, and negative embedding. But this is after the embeddings for the batch are computed.

So the steps are:

  1. Compute the embedding for each image in the batch
  2. Compute the loss by finding all the triplets within the ba…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by learnfromgroundup
Comment options

You must be logged in to vote
2 replies
@KevinMusgrave
Comment options

@learnfromgroundup
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants