Skip to content

Commit 9360835

Browse files
committed
Fix UND AgentLayer.
1 parent cad7bd1 commit 9360835

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

paddle/gserver/gradientmachines/NeuralNetwork.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ limitations under the License. */
1616

1717
#include "NeuralNetwork.h"
1818
#include "hl_gpu.h"
19-
#include "paddle/gserver/layers/AgentLayer.h"
2019
#include "paddle/utils/CustomStackTrace.h"
2120
#include "paddle/utils/Logging.h"
2221
#include "paddle/utils/Stat.h"
@@ -28,6 +27,7 @@ limitations under the License. */
2827
#ifndef PADDLE_MOBILE_INFERENCE
2928
#include "MultiNetwork.h"
3029
#include "RecurrentGradientMachine.h"
30+
#include "paddle/gserver/layers/AgentLayer.h"
3131
#endif
3232

3333
namespace paddle {
@@ -192,9 +192,11 @@ void NeuralNetwork::init(const ModelConfig& config,
192192
void NeuralNetwork::connect(LayerPtr agentLayer,
193193
LayerPtr realLayer,
194194
int height) {
195+
#ifndef PADDLE_MOBILE_INFERENCE
195196
AgentLayer* agent = dynamic_cast<AgentLayer*>(agentLayer.get());
196197
CHECK_NOTNULL(agent);
197198
agent->setRealLayer(realLayer, height);
199+
#endif
198200
}
199201

200202
void NeuralNetwork::connect(std::string agentLayerName,

0 commit comments

Comments
 (0)