Commit 947db8fb by xiaotong

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

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