add SumColumnElements function to ComputationNetwork

Change Sum function to SumElements in ComputationNetwork
This commit is contained in:
Dong Yu 2015-08-12 11:31:45 -07:00
Родитель 370c0ff0a1
Коммит d06170f0f2
2 изменённых файлов: 9 добавлений и 2 удалений

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

@ -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;