Skip to content

Instantly share code, notes, and snippets.

View utsavgarg's full-sized avatar

Utsav Garg utsavgarg

View GitHub Profile
@utsavgarg
utsavgarg / SoftmaxSoftLabel.py
Created March 7, 2017 05:40
Caffe python layer to compute the Softmax loss with non binary ground truth labels
import caffe
import numpy as np
class SoftmaxLossModLayer(caffe.Layer):
"""
Compute the Softmax Loss in the same manner but consider soft labels
as the ground truth
"""
def setup(self, bottom, top):
# check input pair
@utsavgarg
utsavgarg / NetworkinNetwork.prototxt
Created March 7, 2017 02:12
Train Val Prototxt
name: "CIFAR10_full"
layer {
name: "cifar"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
data_param {
@utsavgarg
utsavgarg / VGG16_Deploy.prototxt
Created March 6, 2017 17:06
VGG16 deploy updated for newer Caffe version
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 10 dim: 3 dim: 224 dim: 224 } }
}
layer {
bottom: "data"
top: "conv1_1"