add SumColumnElements function to ComputationNetwork
Change Sum function to SumElements in ComputationNetwork
This commit is contained in:
Родитель
370c0ff0a1
Коммит
d06170f0f2
|
@ -2122,7 +2122,7 @@ public:
|
|||
return newNode;
|
||||
}
|
||||
|
||||
ComputationNodePtr Sum(const ComputationNodePtr a, const std::wstring nodeName = L"")
|
||||
ComputationNodePtr SumElements(const ComputationNodePtr a, const std::wstring nodeName = L"")
|
||||
{
|
||||
ComputationNodePtr newNode(new SumElementsNode<ElemType>(m_deviceId, nodeName));
|
||||
newNode->AttachInputs(a);
|
||||
|
@ -2130,6 +2130,13 @@ public:
|
|||
return newNode;
|
||||
}
|
||||
|
||||
ComputationNodePtr SumColumnElements(const ComputationNodePtr a, const std::wstring nodeName = L"")
|
||||
{
|
||||
ComputationNodePtr newNode(new SumColumnElementsNode<ElemType>(m_deviceId, nodeName));
|
||||
newNode->AttachInputs(a);
|
||||
AddNodeToNet(newNode);
|
||||
return newNode;
|
||||
}
|
||||
ComputationNodePtr Scale(const ComputationNodePtr scalar,
|
||||
const ComputationNodePtr matrix,
|
||||
const std::wstring nodeName = L"")
|
||||
|
|
|
@ -316,7 +316,7 @@ public:
|
|||
cnNodeType == FutureValueNode<ElemType>::TypeName())
|
||||
{
|
||||
if (parameter.size() <2 || parameter.size() >3)
|
||||
RuntimeError("PastValue or FutureValue should have two to three fixed parameters. Usage: PastValue(rows, [cols], m, [timeStep=1, defaultPastValue=0.1]).");
|
||||
RuntimeError("PastValue or FutureValue should have two to three fixed parameters. Usage: PastValue(rows, [cols], m, [timeStep=1, defaultHiddenActivity=0.1]).");
|
||||
|
||||
nodeParamCount = 1;
|
||||
nodeParamStart = parameter.size() > 2?2:1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче