cannot add dropout nodes

Dec 18, 2015 at 12:32 PM
Edited Dec 18, 2015 at 12:35 PM
Hello!
I want to add dropout nodes in the training with updated CNTK version, but it happened to meet errors. The config file is like the following:
 featNormIn  = MeanVarNorm(featIn)
 featNormIn_D = Dropout(featNormIn)
And the log file is:
Validating --> featNormIn.xNorm = PerDimMeanVarNormalization(featIn[1799, MBSize 1], featNormIn.xMean[1799, 1], featNormIn.xStdDev[1799, 1]) -> [1799, MBSize 1]
Validating --> featNormIn_D = Dropout(featNormIn.xNorm[1799, MBSize 1])
[CALL STACK]
libcntkmath.so ( Microsoft::MSR::CNTK::DebugUtil::PrintCallStack() + 0xba ) [0x7fcd6c79646a]
./cntk ( void Microsoft::MSR::CNTK::ThrowFormatted<std::runtime_error>(char const*, ...) + 0xc0 ) [0x44ab90]
./cntk ( ) [0x618070]
./cntk ( ) [0x457962]
./cntk ( ) [0x633880]
./cntk ( ) [0x6344f8]
./cntk ( ) [0x635b1f]
./cntk ( ) [0x500d0f]
./cntk ( ) [0x500f09]
./cntk ( std::_Function_handler<std::shared_ptr<Microsoft::MSR::CNTK::ComputationNetwork> (int), void DoTrain<Microsoft::MSR::CNTK::ConfigParameters, float>(Microsoft::MSR::CNTK::ConfigParameters const&)::{lambda(int)#2}>::_M_invoke(std::_Any_data const&, int) + 0x12 ) [0x446642]
./cntk ( ) [0x6b8ba9]
./cntk ( ) [0x4c115e]
./cntk ( ) [0x50f137]
./cntk ( ) [0x44583c]
./cntk ( ) [0x445ee8]
./cntk ( ) [0x509af8]
/lib64/libc.so.6 ( __libc_start_main + 0xfd ) [0x38f9e1ed5d]
./cntk ( ) [0x43b4dd]

EXCEPTION occurred: Dropout featNormIn_D operation: Mismatch in number of columns

It worked when I used the previous CNTK version, so is there any difference between the two versions or did I make any mistakes?
Thank you very much.
Qing
Dec 18, 2015 at 6:02 PM
Hi Qing, thanks for reporting this. Which is the previous version you are referring to? The binary from April, or a recently compiled one?

This is a bug indeed, an incorrect left-over of refactoring. I don't have a test case handy to test this. Could you try this modification below in Source/ComputationNetworkLib/ComputationNode.cpp?
    // single input that maps its input element-wise (e.g. Sigmoid)
    void ComputationNodeBase::ValidateUnaryMap(bool isFinalValidationPass)
    {
        assert(m_inputs.size() == 1);
        ComputationNodeBase::Validate(isFinalValidationPass);
        InferMBLayoutFromInputsForStandardCase();
        SetDims(m_inputs[0]);                        //   <-- update this line
        InferImageDimsFromInputs();
    }
Dec 18, 2015 at 11:16 PM
Hi, the change above has been committed to the master branch. If you are building from source code, please try this one. We have not updated the downloadable EXE.

Thanks,

Frank
Dec 19, 2015 at 7:59 AM
Hello, thank you for your reply. I downloaded the previous source version in September last year and built it. I got the above error with the downloadable EXE from December. I tried the modification you said in the linux server, but it seems do not work. The output is the screen is:

Segmentation fault (core dumped)

And in the log file nothing is seen after line: Validating --> featNormIn_D = Dropout(featNormIn.xNorm[1799, MBSize 1])

Thanks,
Qing