- pass numContext
- fixed crash when numContext == 0 git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@761 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+3
-2
@@ -116,15 +116,16 @@ bool Stack::load(LayerConstructor *pLayerConstructor)
|
||||
int numVisibleX = layer["numVisibleX"].asInt();
|
||||
int numVisibleY = layer["numVisibleY"].asInt();
|
||||
int numHidden = layer["numHidden"].asInt();
|
||||
int numContext = layer["numContext"].asInt();
|
||||
|
||||
Layer *pLayer = nullptr;
|
||||
if (!pLayerConstructor)
|
||||
{
|
||||
pLayer = new Layer(layername, i, numVisibleX, numVisibleY, numHidden);
|
||||
pLayer = new Layer(layername, i, numVisibleX, numVisibleY, numHidden, numContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
pLayer = pLayerConstructor->onConstruct(layername, i, numVisibleX, numVisibleY, numHidden);
|
||||
pLayer = pLayerConstructor->onConstruct(layername, i, numVisibleX, numVisibleY, numHidden, numContext);
|
||||
}
|
||||
|
||||
assert(pLayer != nullptr);
|
||||
|
||||
Reference in New Issue
Block a user