fix the signature mismatches in NoGPU.cpp

This commit is contained in:
Dong Yu 2015-03-03 20:20:58 -08:00
Родитель 676b894daa
Коммит aabe4dfd72
32 изменённых файлов: 702 добавлений и 635 удалений

0
Demos/Simple/MakeData.m Executable file → Normal file
Просмотреть файл

0
Demos/Simple/Simple.config Executable file → Normal file
Просмотреть файл

0
Demos/Simple/SimpleDataTest.txt Executable file → Normal file
Просмотреть файл

0
Demos/Simple/SimpleDataTrain.txt Executable file → Normal file
Просмотреть файл

0
Demos/Simple/SimpleDemoDataReference.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 177 KiB

После

Ширина:  |  Высота:  |  Размер: 177 KiB

0
Demos/Simple/SimpleDemoErrorRateReference.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 11 KiB

После

Ширина:  |  Высота:  |  Размер: 11 KiB

0
Demos/Simple/SimpleDemoOutputReference.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 22 KiB

После

Ширина:  |  Высота:  |  Размер: 22 KiB

0
Demos/Simple/SimpleMapping.txt Executable file → Normal file
Просмотреть файл

0
Demos/Speech/CntkTimit.scp Executable file → Normal file
Просмотреть файл

0
Demos/Speech/CntkTimitOutput.scp Executable file → Normal file
Просмотреть файл

0
Demos/Speech/ComputeConfusion.m Executable file → Normal file
Просмотреть файл

0
Demos/Speech/ConfusionData1.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 16 KiB

0
Demos/Speech/ConfusionData100.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 14 KiB

После

Ширина:  |  Высота:  |  Размер: 14 KiB

0
Demos/Speech/ConfusionData25.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

0
Demos/Speech/HCopyTimit.config Executable file → Normal file
Просмотреть файл

0
Demos/Speech/HCopyTimit.scp Executable file → Normal file
Просмотреть файл

0
Demos/Speech/ShowConfusions.m Executable file → Normal file
Просмотреть файл

0
Demos/Speech/SpeechErrorRate.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 11 KiB

После

Ширина:  |  Высота:  |  Размер: 11 KiB

0
Demos/Speech/TimitGetFiles.py Executable file → Normal file
Просмотреть файл

0
Demos/Speech/TimitLabels.mlf Executable file → Normal file
Просмотреть файл

0
Demos/Speech/TimitStateList.txt Executable file → Normal file
Просмотреть файл

0
Demos/Speech/TimitSubjectList.txt Executable file → Normal file
Просмотреть файл

0
Demos/Speech/TrainSimpleTimit.config Executable file → Normal file
Просмотреть файл

0
Demos/Speech/TrainSimpleTimit.sh Executable file → Normal file
Просмотреть файл

Просмотреть файл

@ -15,7 +15,9 @@
#pragma warning (disable: 4100) // unreferenced formal parameter, which is OK since all functions in here are dummies; disabling this allows to copy-paste prototypes here when we add new functions
#pragma warning (disable: 4702) // unreachable code, which we get from the NOT_IMPLEMENTED macro which is OK
namespace Microsoft { namespace MSR { namespace CNTK {
namespace Microsoft {
namespace MSR {
namespace CNTK {
// the reset below are dummy implementations
void PrepareDevice(DEVICEID_TYPE deviceId);
@ -67,13 +69,8 @@ namespace Microsoft { namespace MSR { namespace CNTK {
// Start of new GPU Sparse Matrix code
//-------------------------------------------------------------------------
template<class ElemType> ElemType* GPUSparseMatrix<ElemType>::BufferPointer() const
{
return this->m_blockVal;
}
template<class ElemType> void GPUSparseMatrix<ElemType>::Resize(const size_t numRows, const size_t numCols, const size_t numNZ, const MatrixFormat matrixFormat, const bool growOnly = true) {}//matrix format will affect the size to allocate
template<class ElemType> void GPUSparseMatrix<ElemType>::Resize(const size_t numRows, const size_t numCols, const size_t numNZ, const bool growOnly = true) {}
template<class ElemType> void GPUSparseMatrix<ElemType>::Resize(const size_t numRows, const size_t numCols, const size_t numNZElemToReserve, const MatrixFormat matrixFormat, const bool growOnly = true, bool keepExistingValues = true) {}//matrix format will affect the size to allocate
template<class ElemType> void GPUSparseMatrix<ElemType>::Resize(const size_t numRows, const size_t numCols, const size_t numNZElemToReserve, const bool growOnly, bool keepExistingValues) {}
template<class ElemType> GPUMatrix<ElemType> GPUSparseMatrix<ElemType>::CopyToDenseMatrix() const
{
@ -106,22 +103,24 @@ namespace Microsoft { namespace MSR { namespace CNTK {
// used for gradients udpate
template<class ElemType> void GPUSparseMatrix<ElemType>::ScaleAndAdd(const ElemType alpha, const GPUSparseMatrix<ElemType>& lhs, GPUMatrix<ElemType>& rhs) { }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceTruncate (const ElemType threshold) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceTruncate(const ElemType threshold) { return *this; }
// normal update for smoothed gradients c and current gradients (this)
template<class ElemType>
void GPUSparseMatrix<ElemType>::NormalGrad(GPUMatrix<ElemType>& c, const ElemType momentum) { }
//-------------------------------------------------------------------------
// End of new GPU Sparse Matrix code
//-------------------------------------------------------------------------
#ifdef NO_SYNC
template<class ElemType> bool GPUSparseMatrix<ElemType>::do_sync = false;
#else
template<class ElemType> bool GPUSparseMatrix<ElemType>::do_sync = true;
#endif
template<class ElemType> void GPUSparseMatrix<ElemType>::MultiplyAndWeightedAdd(ElemType alpha, const GPUSparseMatrix<ElemType>& a, const bool transposeA,
const GPUMatrix<ElemType>& b, const bool transposeD, ElemType beta, GPUMatrix<ElemType>& c) {}
template<class ElemType> void GPUSparseMatrix<ElemType>::Multiply(const GPUSparseMatrix<ElemType>& S, const GPUMatrix<ElemType>& D, GPUMatrix<ElemType>& C) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::Multiply(const GPUMatrix<ElemType>& D, const GPUSparseMatrix<ElemType>& S, GPUMatrix<ElemType>& C) { }
template<class ElemType> size_t GPUSparseMatrix<ElemType>::ElemCountFromBufferSize(const size_t totalBufferSize) const { return 0; }
template<class ElemType> size_t GPUSparseMatrix<ElemType>::ElemCountFromBufferSize(const size_t numRows, const size_t numCols, const MatrixFormat format, const size_t totalBufferSize) const { return 0; }
template<class ElemType> size_t GPUSparseMatrix<ElemType>::ElemCountFromBufferSize() const { return 0; }
@ -131,7 +130,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
// canReuseBuffer - target matrix can be reused for temporary space
// func - function to call to count elements in the result (returns count, and fills csrRowPtr array)
template<class ElemType>
void GPUSparseMatrix<ElemType>::PrepareBuffer(size_t m, size_t n, bool canReuseBuffer, std::function<size_t (int* csrRowPtrC)> func) { }
void GPUSparseMatrix<ElemType>::PrepareBuffer(size_t m, size_t n, bool canReuseBuffer, std::function<size_t(int* csrRowPtrC)> func) { }
// Multiply - multiply one spares matrix by another sparse matrix
// S1 - first sparse matrix
@ -144,15 +143,15 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignProductOf(const GPUSparseMatrix<ElemType>& a, const bool transposeA, const GPUSparseMatrix<ElemType>& /*b*/, const bool transposeB) { return *this; }
template<class ElemType> void GPUSparseMatrix<ElemType>::ScaleAndAdd(ElemType alpha,const GPUSparseMatrix<ElemType>& a, ElemType beta, const GPUSparseMatrix<ElemType>& /*b*/, GPUSparseMatrix<ElemType>& c) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::ScaleAndAdd(ElemType alpha, const GPUSparseMatrix<ElemType>& a, ElemType beta, const GPUSparseMatrix<ElemType>& /*b*/, GPUSparseMatrix<ElemType>& c) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::ScaleAndAdd(ElemType alpha,const GPUSparseMatrix<ElemType>& a, ElemType beta, const GPUMatrix<ElemType>& /*b*/, GPUMatrix<ElemType>& c) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::ScaleAndAdd(ElemType alpha, const GPUSparseMatrix<ElemType>& a, ElemType beta, const GPUMatrix<ElemType>& /*b*/, GPUMatrix<ElemType>& c) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::ScaleAndAdd(ElemType alpha,const GPUMatrix<ElemType>& /*a*/, ElemType beta, const GPUSparseMatrix<ElemType>& /*b*/, GPUMatrix<ElemType>& c) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::ScaleAndAdd(ElemType alpha, const GPUMatrix<ElemType>& /*a*/, ElemType beta, const GPUSparseMatrix<ElemType>& /*b*/, GPUMatrix<ElemType>& c) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::Scale(ElemType alpha, GPUSparseMatrix<ElemType>& a) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::ElementWisePower (ElemType alpha, const GPUSparseMatrix<ElemType>& a, GPUSparseMatrix<ElemType>& c) { }
template<class ElemType> void GPUSparseMatrix<ElemType>::ElementWisePower(ElemType alpha, const GPUSparseMatrix<ElemType>& a, GPUSparseMatrix<ElemType>& c) { }
template<class ElemType> ElemType GPUSparseMatrix<ElemType>::InnerProductOfMatrices(const GPUSparseMatrix<ElemType>& a, const GPUMatrix<ElemType>& /*b*/)
{
@ -200,15 +199,15 @@ namespace Microsoft { namespace MSR { namespace CNTK {
return -1;
}
template<class ElemType> GPUMatrix<ElemType> GPUSparseMatrix<ElemType>::ElementProductOf (const GPUSparseMatrix<ElemType>& a, const GPUMatrix<ElemType>& /*b*/)
template<class ElemType> GPUMatrix<ElemType> GPUSparseMatrix<ElemType>::ElementProductOf(const GPUSparseMatrix<ElemType>& a, const GPUMatrix<ElemType>& /*b*/)
{
GPUMatrix<ElemType> c;
return c;
}
template<class ElemType> GPUMatrix<ElemType> GPUSparseMatrix<ElemType>::ElementProductOf (const GPUMatrix<ElemType>& a, const GPUSparseMatrix<ElemType>& b)
template<class ElemType> GPUMatrix<ElemType> GPUSparseMatrix<ElemType>::ElementProductOf(const GPUMatrix<ElemType>& a, const GPUSparseMatrix<ElemType>& b)
{
return GPUSparseMatrix<ElemType>::ElementProductOf(b,a);
return GPUSparseMatrix<ElemType>::ElementProductOf(b, a);
}
template<class ElemType> GPUSparseMatrix<ElemType> GPUSparseMatrix<ElemType>::operator+ (const GPUSparseMatrix<ElemType>& a) const { return *this; }
@ -262,57 +261,68 @@ namespace Microsoft { namespace MSR { namespace CNTK {
#pragma region Other Functions
template<class ElemType>
GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::ElementInverse () { return *this; }
GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::ElementInverse() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignElementInverseOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignElementInverseOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceSigmoid() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignSigmoidOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignSigmoidOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceLinearRectifierDerivative() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignLinearRectifierDerivativeOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignLinearRectifierDerivativeOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceTanh() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignTanhOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignTanhOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceSqrt() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignSqrtOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignSqrtOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceExp() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignExpOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignExpOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceLog() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignLogOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignLogOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceAbs() { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignAbsOf (const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignAbsOf(const GPUSparseMatrix<ElemType>& a) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceTruncateBottom (const ElemType threshold) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceTruncateBottom(const ElemType threshold) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignTruncateBottomOf (const GPUSparseMatrix<ElemType>& a, const ElemType threshold) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignTruncateBottomOf(const GPUSparseMatrix<ElemType>& a, const ElemType threshold) { return *this; }
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceTruncateTop (const ElemType threshold)
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceTruncateTop(const ElemType threshold)
{
return *this;
}
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignTruncateTopOf (const GPUSparseMatrix<ElemType>& a, const ElemType threshold)
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::AssignTruncateTopOf(const GPUSparseMatrix<ElemType>& a, const ElemType threshold)
{
return *this;
}
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::SetToZeroIfAbsLessThan (const ElemType threshold)
template<class ElemType> GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::SetToZeroIfAbsLessThan(const ElemType threshold)
{
return *this;
}
template<class ElemType>
GPUSparseMatrix<ElemType>& GPUSparseMatrix<ElemType>::InplaceSoftThreshold(const ElemType threshold)
{
return (*this);
}
template<class ElemType>
size_t GPUSparseMatrix<ElemType>::IdentifyRowsWithValues() const
{
return 0;
}
#pragma endregion
@ -366,11 +376,11 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template<class ElemType> DeviceBoundNumber<ElemType>::DeviceBoundNumber(DeviceBoundNumber<ElemType> &&shallowCopy)
{
this->ShallowCopyFrom(shallowCopy.m_data,shallowCopy.m_computeDevice);
shallowCopy.m_data=NULL;
this->ShallowCopyFrom(shallowCopy.m_data, shallowCopy.m_computeDevice);
shallowCopy.m_data = NULL;
}
template<class ElemType> void DeviceBoundNumber<ElemType>::ShallowCopyFrom(ElemType* newVal,int newValsDevceId) { }
template<class ElemType> void DeviceBoundNumber<ElemType>::ShallowCopyFrom(ElemType* newVal, int newValsDevceId) { }
template<class ElemType> DeviceBoundNumber<ElemType>::~DeviceBoundNumber() { }
@ -424,7 +434,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
//matrixName is used to verify that correct matrix is read.
template<class ElemType> GPUMatrix<ElemType>::GPUMatrix(FILE* f, const char * matrixName, int deviceId) { }
template<class ElemType> GPUMatrix<ElemType>::GPUMatrix(const size_t numRows, const size_t numCols,int deviceId) { };
template<class ElemType> GPUMatrix<ElemType>::GPUMatrix(const size_t numRows, const size_t numCols, int deviceId) { };
template<class ElemType> GPUMatrix<ElemType>::GPUMatrix(const size_t numRows, const size_t numCols, ElemType *pArray, const size_t matrixFlags, int deviceId) { };
@ -482,7 +492,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
return cuHandle;
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTransposeOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTransposeOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> void GPUMatrix<ElemType>::SetValue(const ElemType v) { }
@ -509,27 +519,27 @@ namespace Microsoft { namespace MSR { namespace CNTK {
//scaleValue: which scale value to set to the left ones (unmasked items).
template<class ElemType> void GPUMatrix<ElemType>::SetUniformRandomMask(const ElemType maskRate, const ElemType scaleValue, unsigned long seed) { }
template<class ElemType> ElemType GPUMatrix<ElemType>::Adagrad(GPUMatrix<ElemType>& gradients, const bool needAveMultiplier) { }
template<class ElemType> ElemType GPUMatrix<ElemType>::Adagrad(GPUMatrix<ElemType>& gradients, const bool needAveMultiplier) { return 0; }
template<class ElemType> ElemType GPUMatrix<ElemType>::RmsProp(GPUMatrix<ElemType>& gradients, ElemType RMS_GAMMA, ElemType RMS_WGT_INC, ElemType RMS_WGT_MAX, ElemType RMS_WGT_DEC, ElemType RMS_WGT_MIN, const bool needAveMultiplier) { }
template<class ElemType> ElemType GPUMatrix<ElemType>::RmsProp(GPUMatrix<ElemType>& gradients, ElemType RMS_GAMMA, ElemType RMS_WGT_INC, ElemType RMS_WGT_MAX, ElemType RMS_WGT_DEC, ElemType RMS_WGT_MIN, const bool needAveMultiplier) { return 0; }
template<class ElemType> void GPUMatrix<ElemType>::Reshape(const size_t numRows, const size_t numCols) { }
template<class ElemType> void GPUMatrix<ElemType>::Resize(const size_t numRows, const size_t numCols, bool growOnly) { }
template<class ElemType> size_t GPUMatrix<ElemType>::LocateElement (const size_t row, const size_t col) const
template<class ElemType> size_t GPUMatrix<ElemType>::LocateElement(const size_t row, const size_t col) const
{
return 0;
}
template<class ElemType> size_t GPUMatrix<ElemType>::LocateColumn (const size_t col) const
template<class ElemType> size_t GPUMatrix<ElemType>::LocateColumn(const size_t col) const
{
return 0;
}
template<class ElemType> ElemType GPUMatrix<ElemType>::Get00Element() const
{
ElemType res=0;
ElemType res = 0;
return res;
}
#pragma endregion Basic Operators
@ -574,7 +584,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignProductOf(const ElemType alpha, const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignProductOf (const GPUMatrix<ElemType>& /*a*/, const bool transposeA, const GPUMatrix<ElemType>& /*b*/, const bool transposeB) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignProductOf(const GPUMatrix<ElemType>& /*a*/, const bool transposeA, const GPUMatrix<ElemType>& /*b*/, const bool transposeB) { return *this; }
template<class ElemType> GPUMatrix<ElemType> GPUMatrix<ElemType>::operator* (const GPUMatrix<ElemType>& /*a*/) const { return *this; }
@ -593,7 +603,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementPowerOf(const GPUMatrix<ElemType>& /*a*/, const ElemType power) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AddElementProductOf (const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AddElementProductOf(const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::ColumnElementMultiplyWith(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::RowElementMultiplyWith(const GPUMatrix<ElemType>& /*a*/) { return *this; }
@ -601,72 +611,72 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::ColumnElementDivideBy(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::RowElementDivideBy(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::ElementInverse () { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::ElementInverse() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementInverseOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementInverseOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceSigmoid() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignSigmoidOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignSigmoidOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceSigmoidDerivative() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignSigmoidDerivativeOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignSigmoidDerivativeOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceTanh() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTanhOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTanhOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceLogSoftmax (const bool isColWise)
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceLogSoftmax(const bool isColWise)
{
return *this;
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignLogSoftmaxOf (const GPUMatrix<ElemType>& /*a*/, const bool isColWise) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignLogSoftmaxOf(const GPUMatrix<ElemType>& /*a*/, const bool isColWise) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceSqrt() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignSqrtOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignSqrtOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceExp() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignExpOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignExpOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceLog() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignLogOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignLogOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceAbs() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignAbsOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignAbsOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceLinearRectifierDerivative() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignLinearRectifierDerivativeOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignLinearRectifierDerivativeOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceCosine() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignCosineOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignCosineOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceNegativeSine() { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignNegativeSineOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignNegativeSineOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceTruncateBottom (const ElemType threshold) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceTruncateBottom(const ElemType threshold) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTruncateBottomOf (const GPUMatrix<ElemType>& /*a*/, const ElemType threshold) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTruncateBottomOf(const GPUMatrix<ElemType>& /*a*/, const ElemType threshold) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceTruncateTop (const ElemType threshold)
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceTruncateTop(const ElemType threshold)
{
return *this;
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTruncateTopOf (const GPUMatrix<ElemType>& /*a*/, const ElemType threshold)
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignTruncateTopOf(const GPUMatrix<ElemType>& /*a*/, const ElemType threshold)
{
return *this;
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::SetToZeroIfAbsLessThan (const ElemType threshold)
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::SetToZeroIfAbsLessThan(const ElemType threshold)
{
return *this;
}
@ -686,6 +696,51 @@ namespace Microsoft { namespace MSR { namespace CNTK {
{
return (*this);
}
template<class ElemType>
void GPUMatrix<ElemType>::MinusOneAt(GPUMatrix<ElemType>& c, const size_t position)
{}
template<class ElemType>
void GPUMatrix<ElemType>::VectorSum(const GPUMatrix<ElemType>& a, GPUMatrix<ElemType>& c, const bool isColWise)
{}
template<class ElemType>
GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceTruncate(const ElemType threshold)
{
return (*this);
}
template<class ElemType>
GPUMatrix<ElemType>& GPUMatrix<ElemType>::InplaceSoftThreshold(const ElemType threshold)
{
return (*this);
}
template<class ElemType>
GPUMatrix<ElemType>& GPUMatrix<ElemType>::GetARowByIndex(const GPUMatrix<ElemType>& a, const size_t m)
{
return (*this);
}
template<class ElemType>
GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementProductOfWithShiftNeg(const GPUMatrix<ElemType>& a, const GPUMatrix<ElemType>& b, const size_t shift, const size_t nt)
{
return (*this);
}
template<class ElemType>
GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementProductOfWithShift(const GPUMatrix<ElemType>& a, const GPUMatrix<ElemType>& b, const size_t shift)
{
return (*this);
}
template<class ElemType>
void GPUMatrix<ElemType>::InnerProductWithShiftNeg(const GPUMatrix<ElemType>& a, const GPUMatrix<ElemType>& b, GPUMatrix<ElemType>& c, const size_t shift, const size_t nt)
{}
template<class ElemType>
void GPUMatrix<ElemType>::ConductRowElementMultiplyWithShift(const GPUMatrix<ElemType>& a, const GPUMatrix<ElemType>& b, GPUMatrix<ElemType>& c, const size_t shift, const bool isafixed)
{}
template<class ElemType> DeviceBoundNumber<ElemType> GPUMatrix<ElemType>::Sum_AsDeviceBoundNum() const
{
@ -699,11 +754,11 @@ namespace Microsoft { namespace MSR { namespace CNTK {
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::ElementMultiplyWith (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::ElementMultiplyWith(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementProductOf (const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementProductOf(const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementDivisionOf (const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignElementDivisionOf(const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::ElementDivideBy(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> bool GPUMatrix<ElemType>::IsEqualTo(const GPUMatrix<ElemType>& a, const ElemType threshold /*= 1e-8*/) const
@ -742,15 +797,15 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template<class ElemType> ElemType GPUMatrix<ElemType>::FrobeniusNorm() const
{
ElemType h_sum=0;
ElemType h_sum = 0;
return (h_sum);
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignFrobeniusNormOf (const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignFrobeniusNormOf(const GPUMatrix<ElemType>& /*a*/) { return *this; }
template<class ElemType> ElemType GPUMatrix<ElemType>::MatrixNormInf() const
{
ElemType h_maxAbs=0;
ElemType h_maxAbs = 0;
return h_maxAbs;
}
@ -799,7 +854,9 @@ namespace Microsoft { namespace MSR { namespace CNTK {
const size_t inputWidth, const size_t inputHeight, const size_t inputChannels,
const size_t outputWidth, const size_t outputHeight, const size_t outputChannels,
const size_t kernelWidth, const size_t kernelHeight, const size_t horizontalSubsample, const size_t verticalSubsample,
const bool zeroPadding) { return *this; }
const bool zeroPadding) {
return *this;
}
//helpfer function used for convolution neural network
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::UnpackConvolutionInput(GPUMatrix<ElemType>& inputSubBatch,
@ -814,24 +871,32 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignMaxPoolingResult(const GPUMatrix<ElemType>& inputBatch, const size_t channels,
const size_t inputWidth, const size_t inputHeight, const size_t inputSizePerSample,
const size_t outputWidth, const size_t outputHeight, const size_t outputSizePerSample,
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) { return *this; }
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) {
return *this;
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AddMaxPoolingGradient(const GPUMatrix<ElemType>& outputGradientBatch, const GPUMatrix<ElemType>& inputBatch, const GPUMatrix<ElemType>& outputBatch,
const size_t channels,
const size_t inputWidth, const size_t inputHeight, const size_t inputSizePerSample,
const size_t outputWidth, const size_t outputHeight, const size_t outputSizePerSample,
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) { return *this; }
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) {
return *this;
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AssignAveragePoolingResult(const GPUMatrix<ElemType>& inputBatch, const size_t channels,
const size_t inputWidth, const size_t inputHeight, const size_t inputSizePerSample,
const size_t outputWidth, const size_t outputHeight, const size_t outputSizePerSample,
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) { return *this; }
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) {
return *this;
}
template<class ElemType> GPUMatrix<ElemType>& GPUMatrix<ElemType>::AddAveragePoolingGradient(const GPUMatrix<ElemType>& outputGradientBatch,
const size_t channels,
const size_t inputWidth, const size_t inputHeight, const size_t inputSizePerSample,
const size_t outputWidth, const size_t outputHeight, const size_t outputSizePerSample,
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) { return *this; }
const size_t windowWidth, const size_t windowHeight, const size_t horizontalSubsample, const size_t verticalSubsample) {
return *this;
}
#pragma endregion Other helper functions
@ -854,7 +919,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
/// <param name="alpha">Scalar</param>
/// <param name="a">Input matrix</param>
/// <param name="c">Resulting matrix, user is responsible for allocating this</param>
template<class ElemType> void GPUMatrix<ElemType>::ScaleAndAdd(ElemType alpha,const GPUMatrix<ElemType>& /*a*/, GPUMatrix<ElemType>& c) { }
template<class ElemType> void GPUMatrix<ElemType>::ScaleAndAdd(ElemType alpha, const GPUMatrix<ElemType>& /*a*/, GPUMatrix<ElemType>& c) { }
/// <summary>c += alpha * (a-b)</summary>
/// if a, b, c must have same dim
@ -902,7 +967,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
void GPUMatrix<ElemType>::Scale(ElemType alpha, const GPUMatrix<ElemType>& /*a*/, GPUMatrix<ElemType>& c) { }
template<class ElemType> void GPUMatrix<ElemType>::InnerProduct (const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/, GPUMatrix<ElemType>& c, const bool isColWise) { }
template<class ElemType> void GPUMatrix<ElemType>::InnerProduct(const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/, GPUMatrix<ElemType>& c, const bool isColWise) { }
template<class ElemType> ElemType GPUMatrix<ElemType>::InnerProductOfMatrices(const GPUMatrix<ElemType>& /*a*/, const GPUMatrix<ElemType>& /*b*/)
{
@ -962,10 +1027,12 @@ namespace Microsoft { namespace MSR { namespace CNTK {
template class DeviceBoundNumber<float>;
template class DeviceBoundNumber<double>;
template<class ElemType> cublasHandle_t GPUMatrix<ElemType>::s_cuHandle[GPUMatrix<ElemType>::MaxGpus]={0};
template<class ElemType> cublasHandle_t GPUMatrix<ElemType>::s_cuHandle[GPUMatrix<ElemType>::MaxGpus] = { 0 };
template<class ElemType> void* GPUMatrix<ElemType>::s_curandGenerator=NULL;
}}}
template<class ElemType> void* GPUMatrix<ElemType>::s_curandGenerator = NULL;
}
}
}
// define a dummy GPUWatcher class too
#include "GPUWatcher.h"

0
papers/CNTK-TechReport/figures/ConfusionData1.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 16 KiB

0
papers/CNTK-TechReport/figures/ConfusionData100.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 14 KiB

После

Ширина:  |  Высота:  |  Размер: 14 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 177 KiB

После

Ширина:  |  Высота:  |  Размер: 177 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 11 KiB

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 22 KiB

После

Ширина:  |  Высота:  |  Размер: 22 KiB

0
papers/CNTK-TechReport/figures/SpeechErrorRate.png Executable file → Normal file
Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 11 KiB

После

Ширина:  |  Высота:  |  Размер: 11 KiB

0
papers/CNTK-TechReport/lyx/CNTKBook_Introduction.lyx Executable file → Normal file
Просмотреть файл