- integrated RnnStack
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@826 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -34,11 +34,12 @@ AStack* StackCreator::fromJson(Json::Value& project, LayerConstructor *pLayerCon
|
||||
Json::Value &stack = project["stack"];
|
||||
Json::Value &layers = project["stack"]["layers"];
|
||||
int type = stack["type"].asInt();
|
||||
|
||||
int numContext = stack["numContext"].asInt();
|
||||
|
||||
AStack *pStack = nullptr;
|
||||
if (type == AStack::StackType::Rnn)
|
||||
{
|
||||
pStack = new RnnStack(name);
|
||||
pStack = new RnnStack(name, numContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -94,6 +95,7 @@ bool StackCreator::toFile(AStack* pStack, const std::string& dir, const std::str
|
||||
project["stack"]["name"] = name;
|
||||
project["stack"]["type_string"] = AStack::stackTypeStrings[pStack->type()];
|
||||
project["stack"]["type"] = pStack->type();
|
||||
project["stack"]["numContext"] = pStack->numContext();
|
||||
|
||||
Json::Value layers(Json::arrayValue);
|
||||
Layer *pLayer = pStack->getLayer(0);
|
||||
|
||||
Reference in New Issue
Block a user