fix bug where the output is a list
diff --git a/python/singa/module.py b/python/singa/module.py
index 23e1715..88881c0 100644
--- a/python/singa/module.py
+++ b/python/singa/module.py
@@ -48,7 +48,11 @@
# deconstruct Operations before running the entire graph
if name == 'optim':
for fname in self._results:
- self._results[fname].creator = None
+ if isinstance(self._results[fname], list):
+ for _matrix in self._results[fname]:
+ _matrix.creator = None
+ else:
+ self._results[fname].creator = None
# make sure all Operations are deallocated
gc.collect()
# add result tensor
diff --git a/src/core/scheduler/scheduler.cc b/src/core/scheduler/scheduler.cc
index 76b9e7f..be31c6e 100644
--- a/src/core/scheduler/scheduler.cc
+++ b/src/core/scheduler/scheduler.cc
@@ -189,7 +189,8 @@
for (auto it : blkInfos) {
auto blkInfo = it;
ss << "Block[" << std::setw(w) << blkInfo->id_ << "] addr[" << std::setw(w)
- << blkInfo->blk_ << "] graph_ref[" << std::setw(w) << blkInfo->graph_ref_
+ << blkInfo->blk_ << "] size[" << std::setw(10) << blkInfo->blk_->size()
+ << "] graph_ref[" << std::setw(w) << blkInfo->graph_ref_
<< "] ref_count[" << std::setw(w) << blkInfo->blk_->ref_count() << "] ";
switch (blkInfo->type_) {
case BlockType::kInput: