This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
cs501r_f2016:lab9 [2016/11/09 18:31] wingated |
cs501r_f2016:lab9 [2021/06/30 23:42] (current) |
||
|---|---|---|---|
| Line 10: | Line 10: | ||
| - You must implement a siamese network that accepts two input images | - You must implement a siamese network that accepts two input images | ||
| - The network must output the probability that the two images are the same class | - The network must output the probability that the two images are the same class | ||
| + | - You should train the network using the contrastive loss function discussed in class | ||
| - Your implementation should use a ResNet architecture | - Your implementation should use a ResNet architecture | ||
| Line 46: | Line 47: | ||
| - Make sure that parameters are shared across both halves of the network! | - Make sure that parameters are shared across both halves of the network! | ||
| - Train the network using an optimizer of your choice | - Train the network using an optimizer of your choice | ||
| + | - You should use some sort of SGD. | ||
| + | - You will need to sample same/different pairs. | ||
| Note: you will NOT be graded on the accuracy of your final classifier, as long as you make a good faith effort to come up with something that performs reasonably well. | Note: you will NOT be graded on the accuracy of your final classifier, as long as you make a good faith effort to come up with something that performs reasonably well. | ||
| Your ResNet should extract a vector of features from each image. Those feature vectors should then be compared to calculate an "energy"; that energy should then be input into a contrastive loss function, as discussed in class. | Your ResNet should extract a vector of features from each image. Those feature vectors should then be compared to calculate an "energy"; that energy should then be input into a contrastive loss function, as discussed in class. | ||
| + | |||
| + | Remember that your network should be symmetric, so if you swap input images, nothing should change. | ||
| Note that some people in the database only have one image. These images are still useful, however (why?), so don't just throw them away. | Note that some people in the database only have one image. These images are still useful, however (why?), so don't just throw them away. | ||