- numcontext is property of Layer

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@844 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-19 16:05:23 +00:00
parent 2f3c10095a
commit 6a05a88d15
7 changed files with 60 additions and 80 deletions
+1 -3
View File
@@ -34,12 +34,11 @@ 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, numContext);
pStack = new RnnStack(name);
}
else
{
@@ -95,7 +94,6 @@ 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);