Skip to content

Instantly share code, notes, and snippets.

@axel-angel
axel-angel / pyloss.py
Last active May 4, 2018 01:04
Caffe Python layer for Contrastive Loss
import caffe
import numpy as np
import os
import sys
# Author: Axel Angel, copyright 2015, license GPLv3.
class OwnContrastiveLossLayer(caffe.Layer):
def setup(self, bottom, top):