@@ -51,7 +51,7 @@ public void fit(NDArray x, NDArray y,
5151 StepsPerExecution = _steps_per_execution
5252 } ) ;
5353
54- FitInternal ( epochs ) ;
54+ FitInternal ( epochs , verbose ) ;
5555 }
5656
5757 public void fit ( IDatasetV2 dataset ,
@@ -80,10 +80,10 @@ public void fit(IDatasetV2 dataset,
8080 StepsPerExecution = _steps_per_execution
8181 } ) ;
8282
83- FitInternal ( epochs ) ;
83+ FitInternal ( epochs , verbose ) ;
8484 }
8585
86- void FitInternal ( int epochs )
86+ void FitInternal ( int epochs , int verbose )
8787 {
8888 stop_training = false ;
8989 _train_counter . assign ( 0 ) ;
@@ -96,8 +96,11 @@ void FitInternal(int epochs)
9696 {
9797 // callbacks.on_train_batch_begin(step)
9898 var results = train_step_function ( iterator ) ;
99- var result_pairs = string . Join ( ", " , results . Select ( x => $ "{ x . Item1 } : { ( float ) x . Item2 : F6} ") ) ;
100- Console . WriteLine ( $ "Epoch: { epoch + 1 : D3} /{ epochs : D3} , Step: { step + 1 : D4} /{ data_handler . Inferredsteps : D4} , { result_pairs } ") ;
99+ if ( verbose == 1 )
100+ {
101+ var result_pairs = string . Join ( ", " , results . Select ( x => $ "{ x . Item1 } : { ( float ) x . Item2 : F6} ") ) ;
102+ Console . WriteLine ( $ "Epoch: { epoch + 1 : D3} /{ epochs : D3} , Step: { step + 1 : D4} /{ data_handler . Inferredsteps : D4} , { result_pairs } ") ;
103+ }
101104 }
102105
103106 GC . Collect ( ) ;
0 commit comments