Skip to content

Commit

Permalink
Initial commit for Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
thhoens committed Mar 21, 2016
1 parent 7c11384 commit b4a8411
Show file tree
Hide file tree
Showing 25 changed files with 1,561 additions and 911 deletions.
1 change: 1 addition & 0 deletions Source/CNTK/CNTK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ int wmain(int argc, wchar_t* argv[]) // wmain wrapper that reports Win32 excepti
else if (code == EXCEPTION_STACK_OVERFLOW) msg = ": Stack overflow";
else if (code == EXCEPTION_DLL_NOT_FOUND) msg = ": Module not found";
fprintf(stderr, "CNTK: Caught Win32 exception 0x%08x%s.\n", (unsigned int)code, msg);
Microsoft::MSR::CNTK::DebugUtil::PrintCallStack();
fflush(stderr);
exit(EXIT_FAILURE);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/ComputationNetworkLib/ComputationNetworkLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
</Project>
2 changes: 1 addition & 1 deletion Source/ComputationNetworkLib/ComputationNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ class ComputationNode : public ComputationNodeBase // abstract class that cannot
virtual void RequestMatricesBeforeForwardProp(MatrixPool& matrixPool) override
{
if (IsValueSharable())
RequestMatrixFromPool(m_value, matrixPool);
RequestMatrixFromPool(m_value, matrixPool);
else
CreateMatrixIfNull(m_value);
}
Expand Down
10 changes: 10 additions & 0 deletions Source/ComputationNetworkLib/InputAndParamNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,13 @@ class LookupTableNode : public ComputationNode<ElemType>, public NumInputs<2>
inputFunctionValues.Reshape(rows1 / wordsInEachSample, cols1 * wordsInEachSample);
gradientValues.Reshape(rowsp / wordsInEachSample, colsp * wordsInEachSample);

gradientValues.HasNan("lookuptable node - backprop left - gradientValues");
inputFunctionValues.HasNan("lookuptable node - backprop left - inputFunctionValues");

Matrix<ElemType>::MultiplyAndAdd(gradientValues, false, inputFunctionValues, true, inputGradientValues);

inputGradientValues.HasNan("lookuptable node - backprop left - inputGradientValues");

inputFunctionValues.Reshape(rows1, cols1);
gradientValues.Reshape(rowsp, colsp);
}
Expand All @@ -575,8 +580,13 @@ class LookupTableNode : public ComputationNode<ElemType>, public NumInputs<2>
inputGradientValues.Reshape(rows1 / wordsInEachSample, cols1 * wordsInEachSample);
gradientValues.Reshape(rowsp / wordsInEachSample, colsp * wordsInEachSample);

gradientValues.HasNan("lookuptable node - backprop right - gradientValues");
inputFunctionValues.HasNan("lookuptable node - backprop right - inputFunctionValues");

Matrix<ElemType>::MultiplyAndAdd(inputFunctionValues, true, gradientValues, false, inputGradientValues);

inputGradientValues.HasNan("lookuptable node - backprop right - inputGradientValues");

inputGradientValues.Reshape(rows1, cols1);
gradientValues.Reshape(rowsp, colsp);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/ComputationNetworkLib/LinearAlgebraNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ class CosDistanceWithNegativeSamplesNode : public ComputationNode<ElemType>, pub
Matrix<ElemType>::ConductRowElementMultiplyWithShift(temp, in1, leftTerm, currshift, true);
}

leftTerm = leftTerm - rightTerm;
leftTerm -= rightTerm;

temp.GetARowByIndex(thisGradientValues, m);

Expand Down
8 changes: 5 additions & 3 deletions Source/ComputationNetworkLib/TrainingNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ class CrossEntropyWithSoftmaxNode : public ComputationNodeNonLooping /*Computati
if (inputIndex == 0) // left derivative
{
#if DUMPOUTPUT
*m_logSoftmaxOfRight.Print("CrossEntropyWithSoftmax Partial-logSoftmaxOfRight");
//(*m_logSoftmaxOfRight).Print("CrossEntropyWithSoftmax Partial-logSoftmaxOfRight");
(*(m_logSoftmaxOfRight.get())).Print("CrossEntropyWithSoftmax Partial-logSoftmaxOfRight");
Gradient().Print("CrossEntropyWithSoftmax Partial-gradientValues");
Input(0)->GradientFor(fr).Print("CrossEntropyWithSoftmaxNode Partial-Left-in");
#endif
Expand All @@ -154,7 +155,8 @@ class CrossEntropyWithSoftmaxNode : public ComputationNodeNonLooping /*Computati
else if (inputIndex == 1) // right derivative
{
#if DUMPOUTPUT
*m_softmaxOfRight.Print("CrossEntropyWithSoftmax Partial-softmaxOfRight");
//*m_softmaxOfRight.Print("CrossEntropyWithSoftmax Partial-softmaxOfRight");
(*(m_softmaxOfRight.get())).Print("CrossEntropyWithSoftmax Partial-softmaxOfRight");
Input(0)->ValueFor(fr).Print("CrossEntropyWithSoftmax Partial-inputFunctionValues");
Gradient().Print("CrossEntropyWithSoftmax Partial-gradientValues");
Input(1)->GradientFor(fr).Print("CrossEntropyWithSoftmaxNode Partial-Right-in");
Expand Down Expand Up @@ -310,7 +312,7 @@ class CrossEntropyNode : public ComputationNodeNonLooping /*ComputationNode*/<El
Value().AssignInnerProductOfMatrices(Input(0)->MaskedValueFor(fr), *m_logOfRight);
Value() *= -1;
#if NANCHECK
functionValues.HasNan("CrossEntropy");
Value().HasNan("CrossEntropy");
#endif
}

Expand Down
Loading

0 comments on commit b4a8411

Please sign in to comment.