swh:1:snp:f50ab94432af916b5fb8b4ad831e8dddded77084
Raw File
Tip revision: 40798460126cd6b257036f37d16bb19e23f352f0 authored by Mark Hillebrand on 13 September 2017, 10:31:29 UTC
WIP
Tip revision: 4079846
UtteranceDerivativeComputationInterface.h
#pragma once

#include "Matrix.h"
#include "basetypes.h"

namespace Microsoft { namespace MSR { namespace CNTK {

// This class defines the interface for utterance derivative computation.
template <class ElemType>
class UtteranceDerivativeComputationInterface
{
public:
    // Computes derivative and objective for given utterance ID and
    // log-likelihood from neural network output.
    virtual bool ComputeDerivative(const wstring& /*uttID*/,
                                   const Matrix<ElemType>& /*logLikelihood*/,
                                   Matrix<ElemType>* /*derivative*/,
                                   ElemType* /*objective*/) = 0;

    // Returns true if we have resources to comptue the derivative, otherwise
    // returns false.
    virtual bool HasResourceForDerivative(const wstring& /*uttID*/) const = 0;
};
} } }
back to top