用法:
class mxnet.contrib.tensorboard.LogMetricsCallback(logging_dir, prefix=None)
- logging_dir:(
str
) - TensorBoard 事件文件目錄。之後,使用tensorboard -logdir=path/to/logs
啟動TensorBoard 可視化。 - prefix:(
str
) - 度量名稱的前綴scalar
值。您可能希望使用此參數來利用 TensorBoard 繪圖函數,其中 TensorBoard 在同一圖表中繪製不同的曲線name
.以下示例顯示了用法(如何在同一圖中比較訓練和評估指標)。
- logging_dir:(
參數:
基礎:
object
在 TensorBoard 中定期記錄指標 此回調的工作方式與
callback.Speedometer
幾乎相同,但寫入 TensorBoard 事件文件以進行可視化。更多用法請參考https://github.com/dmlc/tensorboard例子:
>>> # log train and eval metrics under different directories. >>> training_log = 'logs/train' >>> evaluation_log = 'logs/eval' >>> # in this case, each training and evaluation metric pairs has same name, >>> # you can add a prefix to make it separate. >>> batch_end_callbacks = [mx.contrib.tensorboard.LogMetricsCallback(training_log)] >>> eval_end_callbacks = [mx.contrib.tensorboard.LogMetricsCallback(evaluation_log)] >>> # run >>> model.fit(train, >>> ... >>> batch_end_callback = batch_end_callbacks, >>> eval_end_callback = eval_end_callbacks) >>> # Then use `tensorboard --logdir=logs/` to launch TensorBoard visualization.
相關用法
- Python mxnet.contrib.ndarray.index_copy用法及代碼示例
- Python mxnet.contrib.symbol.SparseEmbedding用法及代碼示例
- Python mxnet.contrib.symbol.edge_id用法及代碼示例
- Python mxnet.contrib.symbol.dgl_graph_compact用法及代碼示例
- Python mxnet.contrib.symbol.dgl_adjacency用法及代碼示例
- Python mxnet.contrib.ndarray.hawkesll用法及代碼示例
- Python mxnet.contrib.ndarray.SparseEmbedding用法及代碼示例
- Python mxnet.contrib.ndarray.ifft用法及代碼示例
- Python mxnet.contrib.ndarray.group_adagrad_update用法及代碼示例
- Python mxnet.contrib.ndarray.fft用法及代碼示例
- Python mxnet.contrib.ndarray.boolean_mask用法及代碼示例
- Python mxnet.contrib.symbol.dgl_csr_neighbor_non_uniform_sample用法及代碼示例
- Python mxnet.contrib.ndarray.dgl_subgraph用法及代碼示例
- Python mxnet.contrib.io.DataLoaderIter用法及代碼示例
- Python mxnet.contrib.symbol.ifft用法及代碼示例
- Python mxnet.contrib.symbol.count_sketch用法及代碼示例
- Python mxnet.contrib.symbol.fft用法及代碼示例
- Python mxnet.contrib.symbol.ModulatedDeformableConvolution用法及代碼示例
- Python mxnet.contrib.ndarray.edge_id用法及代碼示例
- Python mxnet.contrib.ndarray.ModulatedDeformableConvolution用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.contrib.tensorboard.LogMetricsCallback。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。