[GitHub] piiswrong commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-08 Thread git
piiswrong commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131982184
 
 

 ##
 File path: example/image-classification/common/fit.py
 ##
 @@ -168,10 +168,16 @@ def fit(args, network, data_loader, **kwargs):
 
 # callbacks that run after each batch
 batch_end_callbacks = [mx.callback.Speedometer(args.batch_size, 
args.disp_batches)]
+eval_end_callbacks = []
 if 'batch_end_callback' in kwargs:
 cbs = kwargs['batch_end_callback']
 batch_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
+# tensorboard logs
+if "eval_end_callback" in kwargs:
+   cbs = kwargs['eval_end_callback']
+eval_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
 Review comment:
   indentation.
   Have you verified that this runs?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-08 Thread git
piiswrong commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131981997
 
 

 ##
 File path: example/image-classification/common/fit.py
 ##
 @@ -168,10 +168,16 @@ def fit(args, network, data_loader, **kwargs):
 
 # callbacks that run after each batch
 batch_end_callbacks = [mx.callback.Speedometer(args.batch_size, 
args.disp_batches)]
+eval_end_callbacks = []
 if 'batch_end_callback' in kwargs:
 cbs = kwargs['batch_end_callback']
 batch_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
+# tensorboard logs
+if "eval_end_callback" in kwargs:
+   cbs = kwargs['eval_end_callback']
+eval_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
 Review comment:
   why not assign directly here?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services