@@ -51,7 +51,7 @@ public void fit(NDArray x, NDArray y,
51
51
StepsPerExecution = _steps_per_execution
52
52
} ) ;
53
53
54
- FitInternal ( epochs ) ;
54
+ FitInternal ( epochs , verbose ) ;
55
55
}
56
56
57
57
public void fit ( IDatasetV2 dataset ,
@@ -80,10 +80,10 @@ public void fit(IDatasetV2 dataset,
80
80
StepsPerExecution = _steps_per_execution
81
81
} ) ;
82
82
83
- FitInternal ( epochs ) ;
83
+ FitInternal ( epochs , verbose ) ;
84
84
}
85
85
86
- void FitInternal ( int epochs )
86
+ void FitInternal ( int epochs , int verbose )
87
87
{
88
88
stop_training = false ;
89
89
_train_counter . assign ( 0 ) ;
@@ -96,8 +96,11 @@ void FitInternal(int epochs)
96
96
{
97
97
// callbacks.on_train_batch_begin(step)
98
98
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
+ }
101
104
}
102
105
103
106
GC . Collect ( ) ;
0 commit comments