浏览代码

minor fixes

Sven Sickert 10 年之前
父节点
当前提交
cab529a5b8
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      semseg/SemSegConvolutionalTree.cpp

+ 2 - 3
semseg/SemSegConvolutionalTree.cpp

@@ -93,7 +93,7 @@ void SemSegConvolutionalTree::train ( const MultiDataset *md )
         fpc->train( fp, examples);
 
         // save trained classifier to file
-        save( fileLocation );
+        if (saveLoadData) save( fileLocation );
 
         // Cleaning up
         for ( vector<CachedExample *>::iterator i = imgexamples.begin();
@@ -120,9 +120,8 @@ void SemSegConvolutionalTree::semanticseg(
     segresult.resize ( xsize, ysize );
 
     Example pce ( ce, 0, 0 );
-    long int offset = 0;
     for ( int y = 0 ; y < ysize ; y++ )
-      for ( int x = 0 ; x < xsize ; x++, offset++ )
+      for ( int x = 0 ; x < xsize ; x++ )
       {
         pce.x = x ;
         pce.y = y;