switched to new Sigmoid(), PlusNode::BackpropTo() still not TensorView
This commit is contained in:
Родитель
6da94ebb73
Коммит
ac61d224f9
|
@ -123,6 +123,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
virtual void /*ComputationNode::*/ForwardProp(const FrameRange & fr) override
|
||||
{
|
||||
#ifdef ENABLE_TENSORVIEW
|
||||
static int c = 0; if (c++ == 0) { fprintf(stderr, "#PLUS#\n"); }
|
||||
size_t rank = DetermineElementwiseTensorRank();
|
||||
auto result = ValueTensorFor(rank, fr);
|
||||
auto input0 = Input(0)->ValueTensorFor(rank, fr.AllowBroadcast());
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
template<class ElemType>
|
||||
DECL ElemType Sigmoid(ElemType z)
|
||||
{
|
||||
#if 1 // BUGBUG: Numerically bad. But if I don't use this, results change.
|
||||
#if 0 // BUGBUG: Numerically bad. But if I don't use this, results change.
|
||||
ElemType negElem = -z;
|
||||
ElemType e = exp_(negElem);
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# Sigmoid non-linearity
|
||||
DNNSigmoidLayer(inDim, outDim, x, parmScale) = [
|
||||
W = Parameter(outDim, inDim, init="uniform", initValueScale=parmScale)
|
||||
b = Parameter(outDim, 1, init="uniform", initValueScale=parmScale)
|
||||
|
@ -6,6 +7,7 @@ DNNSigmoidLayer(inDim, outDim, x, parmScale) = [
|
|||
y = Sigmoid(z)
|
||||
]
|
||||
|
||||
# no non-linearity, as input for SoftMax
|
||||
DNNLayer(inDim, outDim, x, parmScale) = [
|
||||
W = Parameter(outDim, inDim, init="uniform", initValueScale=parmScale)
|
||||
b = Parameter(outDim, 1, init="uniform", initValueScale=parmScale)
|
||||
|
@ -13,6 +15,7 @@ DNNLayer(inDim, outDim, x, parmScale) = [
|
|||
z = Plus(t, b)
|
||||
]
|
||||
|
||||
# ReLU non-linearity
|
||||
ConvReLULayer(inp, outMap, inWCount, kW, kH, hStride, vStride, wScale, bValue) = [
|
||||
convW = Parameter(outMap, inWCount, init="uniform", initValueScale=wScale)
|
||||
conv = Convolution(convW, inp, kW, kH, outMap, hStride, vStride, zeroPadding=false)
|
||||
|
|
Загрузка…
Ссылка в новой задаче