Add plumbing for ExpNode in NDL
This commit is contained in:
Родитель
43ea68b59e
Коммит
08a9c5e946
|
@ -723,6 +723,8 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
newNode = new SigmoidNode<ElemType>(fstream, modelVersion, m_deviceId, nodeName);
|
||||
else if (nodeType == TanhNode<ElemType>::TypeName())
|
||||
newNode = new TanhNode<ElemType>(fstream, modelVersion, m_deviceId, nodeName);
|
||||
else if (nodeType == ExpNode<ElemType>::TypeName())
|
||||
newNode = new ExpNode<ElemType>(fstream, modelVersion, m_deviceId, nodeName);
|
||||
else if (nodeType == LogNode<ElemType>::TypeName())
|
||||
newNode = new LogNode<ElemType>(fstream, modelVersion, m_deviceId, nodeName);
|
||||
else if (nodeType == CosineNode<ElemType>::TypeName())
|
||||
|
@ -878,6 +880,8 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
newNode = new SigmoidNode<ElemType>(m_deviceId, nodeName);
|
||||
else if (nodeType == TanhNode<ElemType>::TypeName())
|
||||
newNode = new TanhNode<ElemType>(m_deviceId, nodeName);
|
||||
else if (nodeType == ExpNode<ElemType>::TypeName())
|
||||
newNode = new ExpNode<ElemType>(m_deviceId, nodeName);
|
||||
else if (nodeType == LogNode<ElemType>::TypeName())
|
||||
newNode = new LogNode<ElemType>(m_deviceId, nodeName);
|
||||
else if (nodeType == CosineNode<ElemType>::TypeName())
|
||||
|
@ -1113,7 +1117,15 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
return newNode;
|
||||
}
|
||||
|
||||
ComputationNodePtr Log(const ComputationNodePtr a, const std::wstring nodeName = L"")
|
||||
ComputationNodePtr Exp(const ComputationNodePtr a, const std::wstring nodeName = L"")
|
||||
{
|
||||
ComputationNodePtr newNode(new ExpNode<ElemType>(m_deviceId, nodeName));
|
||||
newNode->AttachInputs(a);
|
||||
AddNodeToNet(newNode);
|
||||
return newNode;
|
||||
}
|
||||
|
||||
ComputationNodePtr Log(const ComputationNodePtr a, const std::wstring nodeName = L"")
|
||||
{
|
||||
ComputationNodePtr newNode(new LogNode<ElemType>(m_deviceId, nodeName));
|
||||
newNode->AttachInputs(a);
|
||||
|
|
|
@ -176,6 +176,8 @@ bool CheckFunction(std::string& p_nodeType, bool* allowUndeterminedVariable)
|
|||
ret = true;
|
||||
else if (EqualInsensitive(nodeType, TanhNode<ElemType>::TypeName()))
|
||||
ret = true;
|
||||
else if (EqualInsensitive(nodeType, ExpNode<ElemType>::TypeName()))
|
||||
ret = true;
|
||||
else if (EqualInsensitive(nodeType, LogNode<ElemType>::TypeName()))
|
||||
ret = true;
|
||||
else if (EqualInsensitive(nodeType, CosineNode<ElemType>::TypeName(), L"Cos"))
|
||||
|
|
|
@ -886,6 +886,7 @@ void PTaskGraphBuilder<ElemType>::CreateTaskDescriptorsForComputationNodes()
|
|||
opName == ElementTimesNode<ElemType>::TypeName() ||
|
||||
opName == DiagTimesNode<ElemType>::TypeName() ||
|
||||
opName == DropoutNode<ElemType>::TypeName() ||
|
||||
opName == ExpNode<ElemType>::TypeName() ||
|
||||
opName == LogNode<ElemType>::TypeName() ||
|
||||
opName == CosineNode<ElemType>::TypeName() ||
|
||||
opName == MinusNode<ElemType>::TypeName() ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче