Minor bug fixes.
This commit is contained in:
Родитель
58855e8fd9
Коммит
f48425b67c
|
@ -253,7 +253,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
if (numCols == 0)
|
||||
throw std::logic_error("The slice cannot have 0 columns.");
|
||||
|
||||
if (startColumn + numCols > m_numCols)
|
||||
if (startColumn + numCols > fromMatrix.m_numCols)
|
||||
throw std::logic_error("The slice is out of range of the source matrix.");
|
||||
|
||||
Clear();
|
||||
|
|
|
@ -549,7 +549,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
if (numCols == 0)
|
||||
throw std::logic_error("The slice cannot have 0 columns.");
|
||||
|
||||
if (startColumn + numCols > m_numCols)
|
||||
if (startColumn + numCols > fromMatrix.m_numCols)
|
||||
throw std::logic_error("The slice is out of range of the source matrix.");
|
||||
|
||||
Clear();
|
||||
|
@ -557,6 +557,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
m_computeDevice=fromMatrix.m_computeDevice;
|
||||
m_externalBuffer=true;
|
||||
m_numRows = fromMatrix.m_numRows;
|
||||
m_numCols = numCols;
|
||||
m_pArray=fromMatrix.m_pArray + startColumn * m_numRows;
|
||||
|
||||
m_elemSizeAllocated = GetNumElements();
|
||||
|
@ -564,7 +565,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
m_format = fromMatrix.m_format;
|
||||
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
//for each column of a, we assign all rows of a to this starting from startIndex
|
||||
template<class ElemType>
|
||||
|
|
Загрузка…
Ссылка в новой задаче