codecamp

TensorFlow回调函数:tf.keras.callbacks.RemoteMonitor

tf.keras.callbacks.RemoteMonitor函数

类 RemoteMonitor

继承自:Callback

定义在:tensorflow/python/keras/callbacks.py。

用于将事件流式传输到服务器的回调。

需要requests库。事件被默认发送到root + '/publish/epoch/end/'。调用是HTTP POST ,其中的data参数是以 JSON 编码的事件数据字典。如果send_as_json设置为True,则请求的内容类型是application/json。否则,序列化的JSON将在表单中发送。

参数:

  • root:字符串;目标服务器的根URL。
  • path:字符串;对应于于root的路径,事件将被发送到的地址。
  • field:字符串;JSON字段,用于存储数据。仅当有效负载在表单内发送时(即send_as_json设置为False)才使用该字段。
  • headers:字典;可选的自定义HTTP标头。
  • send_as_json:布尔值;请求是否应作为application/json发送。
__init__
__init__(
    root='http://localhost:9000',
    path='/publish/epoch/end/',
    field='data',
    headers=None,
    send_as_json=False
)

初始化自我。

方法

on_batch_begin
on_batch_begin(
    batch,
    logs=None
)
on_batch_end
on_batch_end(
    batch,
    logs=None
)
on_epoch_begin
on_epoch_begin(
    epoch,
    logs=None
)
on_epoch_end
on_epoch_end(
    epoch,
    logs=None
)
on_train_batch_begin
on_train_batch_begin(
    batch,
    logs=None
)
on_train_batch_end
on_train_batch_end(
    batch,
    logs=None
)
on_train_begin
on_train_begin(logs=None)
on_train_end
on_train_end(logs=None)
set_model
set_model(model)
set_params
set_params(params)

TensorFlow回调函数:tf.keras.callbacks.ReduceLROnPlateau
TensorFlow回调函数:tf.keras.callbacks.TensorBoard
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

TensorFlow 函数介绍

TensorFlow 函数模块:tf

TensorFlow的image模块

TensorFlow使用之tf.io

TensorFlow使用之tf.keras

TensorFlow函数教程:tf.keras.applications

TensorFlow函数教程:tf.keras.backend

TensorFlow使用之tf.metrics

TensorFlow使用之tf.nn

TensorFlow使用之tf.python_io

TensorFlow 功能函数

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }