fixing naming of bprop_cost (thanks to anyone who reported this to Matt)

This commit is contained in:
pswietojanski 2015-11-17 13:59:16 +00:00
parent c77bc3b1cd
commit 9969b47ba4

View File

@ -401,7 +401,7 @@ class Sigmoid(Linear):
___, ograds = super(Sigmoid, self).bprop(h=None, igrads=deltas)
return deltas, ograds
def cost_bprop(self, h, igrads, cost):
def bprop_cost(self, h, igrads, cost):
if cost is None or cost.get_name() == 'bce':
return super(Sigmoid, self).bprop(h=h, igrads=igrads)
else:
@ -475,7 +475,7 @@ class Relu(Linear):
___, ograds = super(Relu, self).bprop(h=None, igrads=deltas)
return deltas, ograds
def cost_bprop(self, h, igrads, cost):
def bprop_cost(self, h, igrads, cost):
raise NotImplementedError('Relu.bprop_cost method not implemented '
'for the %s cost' % cost.get_name())
@ -502,7 +502,7 @@ class Tanh(Linear):
___, ograds = super(Tanh, self).bprop(h=None, igrads=deltas)
return deltas, ograds
def cost_bprop(self, h, igrads, cost):
def bprop_cost(self, h, igrads, cost):
raise NotImplementedError('Tanh.bprop_cost method not implemented '
'for the %s cost' % cost.get_name())
@ -548,7 +548,7 @@ class Maxout(Linear):
___, ograds = super(Maxout, self).bprop(h=None, igrads=deltas)
return deltas, ograds
def cost_bprop(self, h, igrads, cost):
def bprop_cost(self, h, igrads, cost):
raise NotImplementedError('Maxout.bprop_cost method not implemented '
'for the %s cost' % cost.get_name())