-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Description
I have a network with:
EmbeddingSequenceLayer
LastTimeStepVertex
LossLayer
and defined both, LastTimeStepVertex and LossLayer as output (for debugging purposes).
Training works, but inference throws an exception:
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.deeplearning4j.nn.workspace.LayerWorkspaceMgr.setHelperWorkspacePointers(java.util.Map)" because "workspaceMgr" is null
at org.deeplearning4j.nn.graph.ComputationGraph.outputOfLayersDetached(ComputationGraph.java:2335)
at org.deeplearning4j.nn.graph.ComputationGraph.output(ComputationGraph.java:1882)
...
In ComputationGraph.outputOfLayersDetached this code in line 2322 seems risky:
if (closeAtEndIteraton[i] != null) {
for (MemoryWorkspace wsAct : closeAtEndIteraton[i]) {
wsAct.close();
LayerWorkspaceMgr canNowReuse = openActivationsWorkspaces.remove(wsAct);
freeWorkspaceManagers.add(canNowReuse);
}
}
canNowReuse may be null - and is in my case, I tested with a if ..!=null statement before freeWorkspaceManagers.add(canNowReuse);
Metadata
Metadata
Assignees
Labels
No labels