Skip to content

中国特色深度学习训练插件,使用微信监控并控制keras训练过程

Notifications You must be signed in to change notification settings

QuantumLiu/wechat_callback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

wechat_callback

可移步知乎专栏查看详情https://zhuanlan.zhihu.com/p/25670072

Requirement

itchat
keras
numpy
scipy
_thread
 matplotlib

Functions and keywords

Functions 功能

Send training information to wechat every epoch(auto)  

每个epoch自动发送训练信息

Send figures to wechat every epoch(auto)

每个epoch自动发送图表

Get figures manualy

主动获取图表

Shut down/cancel computer

关机/取消关机

Specify a stop epoch

指定训练停止epoch数

Stop now manualy

立刻停止训练(当前epoch结束后)


New:Get gpu status
新增:获取GPU状态

新增:查询进度

Keywords/commands 关键词和命令

stop_training_cmdlist=['Stop now',"That's enough",u'停止训练',u'放弃治疗']  

The keywords of stop training,if any of them is in the msg you sent,the command would be accepted

停止训练的关键词列表,发送的消息中包含任意一项都可触发命令

shut_down_cmdlist=[u'关机','Shut down','Shut down the computer',u'别浪费电了',u'洗洗睡吧']

The keywords of shutting down,similair to stop_training_cmdlist

关机关键词列表,和stop_training_cmdlist类似

cancel_cmdlist=[u'取消','cancel','aaaa']

The keywords of cancel shutting down,similair to stop_training_cmdlist

取消关机关键词列表,和stop_training_cmdlist类似

get_fig_cmdlist=[u'获取图表','Show me the figure']

The keywords of getting figure,similair to stop_training_cmdlist

获取图表关键词列表,和stop_training_cmdlist类似

specify stop epoch:

keywords:'Stop at + epoch'

指定训练停止轮数


gpu_cmdlist=['GPU','gpu',u'显卡']
type_list=['MEMORY', 'UTILIZATION', 'ECC', 'TEMPERATURE', 'POWER', 'CLOCK', 'COMPUTE', 'PIDS', 'PERFORMANCE', 'SUPPORTED_CLOCKS,PAGE_RETIREMENT', 'ACCOUNTING']
显卡关键词  以及可查询状态列表

prog_cmdlist=[u'进度','Progress']
查询进度,预告停止时间
Get progress,preview stop time

Examples

specify stop epoch

指定训练停止轮数

Example:send:'Stop at:8' from your phone,and then training will be stopped after epoch8
例如:手机发送“Stop at:8”,训练将在epoch8完成后停止

Stop training after current epoch finished
当前epoch完成后停止训练
example:send:'Stop now' or send:'停止训练' from your phone,and then training will be stopped after current epoch
例如:手机发送“停止训练”或者“Stop now”,训练将会在当前epoch完成后被停止

Shutting down the computer after specified sec,specify waiting seconds and saved model filename by {sec} and [name](without .h5)
在指定秒数后关机,用{sec}和[name]指定等待时间和保存文件名,文件名不包括.h5
example:send:'Shut down now [test]{120}' from phone,the computer will be shut down after 120s,and save the model as test.h5
or send:'Shut down now{120},don't save',then the model won't be saved.

Cancel shutting down the computer
example:send:'取消关机' or 'cancel' from phone

Get figure of train infomation,specify metrics and level you want to show by[metrics]and{level},defualt are both 'all'
example:send:'Show me the figure [loss]{batches}' from phone,you will recive a jpg image of losses in batches
send:'Show me the figure',you will recive two jpg images of all metrics in batches and epochs
获取图表,通过[metrics]和{level}指定参数,如果没有指定则皆默认为’all'
例如,手机发送"获取图表[loss]{batches}",会收到一个jpg格式的loss随batches变化的图片
手机发送"获取图表",则会得到两张图片,分别是所有指标随batch和epoch的变化

获取gpu状态
发送'gpu[MEMORY]'或者'GPU[MEMORY TEMPERATURE]'或者'显卡[MEMORY]'

About

中国特色深度学习训练插件,使用微信监控并控制keras训练过程

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages