一个keras回调,它将你的tensorboard日志上传到一个云桶中
keras-bucket-tensorboard-callback的Python项目详细描述
Keras Bucket Tensorboard回调
一个keras回调,它将您的tensorboard日志上载到云存储桶中
目前,仅支持谷歌云平台存储。很少努力 是支持aws s3所必需的,所以可以为这个项目做贡献。
安装
pip install keras-bucket-tensorboard-callback
基本用法
以下示例训练将tensorboard日志上载到gcp存储
bucketmy-bucket
,在目录内any_dir
:
# Import the classfromkeras_bucket_tensorboard_callbackimportBucketTensorBoard# Create the callback instance, passing the bucket URIbucket_callback=BucketTensorBoard('gs://my-bucket/any_dir')# Train the model with the callbackmodel.fit(x=X,y=Y,epochs=20,callbacks=[bucket_callback])
确保您可以访问提供的桶。对于GCP,你应该
指向json
键的GOOGLE_APPLICATION_CREDENTIALS
环境集
文件。
在Tensorboard上查看结果
安装TensorBoard后,运行:
tensorboard --logdir=gs://my-bucket/any_dir
tensorboard将显示保存在bucket中的度量和图表。