Commit 39cf77d6 by xiaotong

updates

parent 883673c6
...@@ -122,7 +122,7 @@ void TTDataLoader::SetBatchSize(int myBatchSize) ...@@ -122,7 +122,7 @@ void TTDataLoader::SetBatchSize(int myBatchSize)
/* start the process */ /* start the process */
bool TTDataLoader::Start() bool TTDataLoader::Start()
{ {
FILE * file = fopen(fileName, "wb"); file = fopen(fileName, "wb");
CheckNTErrors(file, "Cannot open the file"); CheckNTErrors(file, "Cannot open the file");
/* skip the first line */ /* skip the first line */
...@@ -144,6 +144,8 @@ bool TTDataLoader::End() ...@@ -144,6 +144,8 @@ bool TTDataLoader::End()
/* get a batch of samples */ /* get a batch of samples */
bool TTDataLoader::GetBatch(XList * args) bool TTDataLoader::GetBatch(XList * args)
{ {
CheckNTErrors(file != NULL, "No input file specificed!");
XTensor * input = NULL; XTensor * input = NULL;
XTensor * gold = NULL; XTensor * gold = NULL;
XTensor * output = NULL; XTensor * output = NULL;
......
...@@ -48,6 +48,9 @@ protected: ...@@ -48,6 +48,9 @@ protected:
/* the output tensors of the model */ /* the output tensors of the model */
XList outputs; XList outputs;
/* the gold standard */
XList gold;
public: public:
...@@ -71,6 +74,9 @@ public: ...@@ -71,6 +74,9 @@ public:
/* get the output list */ /* get the output list */
XList * GetOutput(); XList * GetOutput();
/* get the gold standard */
XList * GetGold();
/* add a new job of model refreshment */ /* add a new job of model refreshment */
bool AddJobRefresh(XModel * myModel); bool AddJobRefresh(XModel * myModel);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论