From 258e5ec59f28f617397646edbf67d4a576f0d3f0 Mon Sep 17 00:00:00 2001 From: liaogang Date: Fri, 17 Feb 2017 13:23:38 +0800 Subject: [PATCH] update GradientMachine API --- paddle/api/GradientMachine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/api/GradientMachine.cpp b/paddle/api/GradientMachine.cpp index 66115f829..a44763bfa 100644 --- a/paddle/api/GradientMachine.cpp +++ b/paddle/api/GradientMachine.cpp @@ -146,7 +146,7 @@ void GradientMachine::randParameters() { m->machine->randParameters(); } Matrix* GradientMachine::getLayerOutput(const std::string& layerName) const throw(UnsupportError) { - auto nn = std::dynamic_pointer_cast(m->machine); + auto nn = m->machine; if (nn) { auto mat = nn->getLayerOutput(layerName); return Matrix::createByPaddleMatrixPtr(&mat); -- GitLab