Commit 947db8fb by xiaotong

remove -smallfootprint and keep the net as small as possible by default

parent 854a4835
...@@ -55,7 +55,7 @@ void XNetClearAll() ...@@ -55,7 +55,7 @@ void XNetClearAll()
XNet::XNet() XNet::XNet()
{ {
nodes.Clear(); nodes.Clear();
isGradEfficient = false; isGradEfficient = true;
} }
/* de-constructor */ /* de-constructor */
......
...@@ -116,7 +116,7 @@ void T2TTrainer::Init(int argc, char ** argv) ...@@ -116,7 +116,7 @@ void T2TTrainer::Init(int argc, char ** argv)
LoadParamBool(argc, argv, "doubledend", &isDoubledEnd, false); LoadParamBool(argc, argv, "doubledend", &isDoubledEnd, false);
LoadParamBool(argc, argv, "smallbatch", &isSmallBatch, true); LoadParamBool(argc, argv, "smallbatch", &isSmallBatch, true);
LoadParamBool(argc, argv, "bigbatch", &isBigBatch, false); LoadParamBool(argc, argv, "bigbatch", &isBigBatch, false);
LoadParamBool(argc, argv, "smallfootprint", &isSmallFootprint, false); LoadParamBool(argc, argv, "debug", &isDebugged, false);
buf = new int[bufSize]; buf = new int[bufSize];
buf2 = new int[bufSize]; buf2 = new int[bufSize];
...@@ -165,8 +165,8 @@ void T2TTrainer::Train(const char * fn, const char * validFN, const char * model ...@@ -165,8 +165,8 @@ void T2TTrainer::Train(const char * fn, const char * validFN, const char * model
XMem * mem = model->mem; XMem * mem = model->mem;
XNet net; XNet net;
if(isSmallFootprint) if(isDebugged)
net.SetGradEfficientFlag(); net.SetGradEfficientFlag(false);
PrepareModel(model); PrepareModel(model);
......
...@@ -142,8 +142,8 @@ public: ...@@ -142,8 +142,8 @@ public:
/* counterpart of "isSmallBatch" */ /* counterpart of "isSmallBatch" */
bool isBigBatch; bool isBigBatch;
/* indicates whether we use small memory footprint for backward process */ /* indicates whether we intend to debug the net */
bool isSmallFootprint; bool isDebugged;
public: public:
/* constructor */ /* constructor */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论