disabled TensorView for PlusNode::BackpropTo() and SigmoidNode, now gives the same for Image/QuickE2E
This commit is contained in:
Родитель
35f774d06e
Коммит
3076962c62
|
@ -452,8 +452,8 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
// Eventually this can go away once we switch completely to cudnn layout.
|
||||
enum ImageLayoutKind
|
||||
{
|
||||
CHW, // cudnn; default for BrainScript
|
||||
HWC // legacy; default for NDL
|
||||
HWC, // legacy; default for NDL
|
||||
CHW // cudnn; default for BrainScript
|
||||
};
|
||||
static inline ImageLayoutKind ImageLayoutKindFrom(const wstring & s)
|
||||
{
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
#endif
|
||||
}
|
||||
|
||||
// BUGBUG: Should not be here. Use PlusNode and m_sampleLayout.
|
||||
// BUGBUG: Should not be here. Use PlusNode and m_sampleLayout. TODO: Bad naming:'output' is actually an 'input'
|
||||
void AddBias(const Matrix<ElemType>& output, const Matrix<ElemType>& bias, Matrix<ElemType>& dst)
|
||||
{
|
||||
assert(m_convEng != nullptr);
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
|
||||
virtual void /*ComputationNode::*/BackpropTo(const size_t inputIndex, const FrameRange & fr) override
|
||||
{
|
||||
#ifdef ENABLE_TENSORVIEW
|
||||
#if 0//def ENABLE_TENSORVIEW
|
||||
// BUGBUG: This gives us a huge perf hit for Image/QuickE2E.
|
||||
size_t rank = DetermineElementwiseTensorRank();
|
||||
auto gradient = GradientTensorFor(rank, fr);
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
// SigmoidNode (input) -- sigmoid non-linearity
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
#ifdef ENABLE_TENSORVIEW
|
||||
#if 0//def ENABLE_TENSORVIEW
|
||||
template<class ElemType>
|
||||
class SigmoidNode : public UnaryElementWiseNode<ElemType>
|
||||
{
|
||||
|
|
|
@ -239,7 +239,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
assert(outT.w() * outT.h() * outT.c() == out.GetNumRows());
|
||||
assert(outT.n() == out.GetNumCols());
|
||||
|
||||
Mat o = out.ColumnSlice(0, out.GetNumCols());
|
||||
Mat o = out.ColumnSlice(0, out.GetNumCols()); // same as .AsReference()
|
||||
Mat d = dst.Reshaped(biasT.c(), outT.w() * outT.h() * outT.n());
|
||||
d.AssignSumOf(o.Reshaped(biasT.c(), outT.w() * outT.h() * outT.n()), bias);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче