microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.52k stars 4.28k forks source link

Matrix.cpp does not implement += and -= for sparse matrices #2180

Open vermorel opened 7 years ago

vermorel commented 7 years ago

With a BrainScript script no more complex than:

lr  = ReduceSum( SquareError(X, Z) )

with X being a sparse input, I end-up with the following exception:

Inside File: Matrix.cpp  Line: 2300  Function: Microsoft::MSR::CNTK::Matrix<float>::operator -=  -> Feature Not Implemented.

[CALL STACK]
    > Microsoft::MSR::CNTK::Matrix<float>::  operator-=
    - Microsoft::MSR::CNTK::Matrix<float>::  AssignDifferenceOf
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2 (x13)
    - Microsoft::MSR::CNTK::MatrixBase::  MatrixBase

EXCEPTION occurred: Inside File: Matrix.cpp  Line: 2300  Function: Microsoft::MSR::CNTK::Matrix<float>::operator -=  -> Feature Not Implemented.

It appears, indeed, that neither += nor -= are implemented in the case of the sparse matrix (same for CPU and GPU).

vermorel commented 7 years ago

Might be a duplicate of #2143

liqunfu commented 7 years ago

To make sure it is a duplicate issue of #2143