Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertanto/bob_telegram_tools
Bob Telegram Tools is a python library that allows you to monitor your machine learning methods just by using Telegram without any additional application.
https://github.com/robertanto/bob_telegram_tools
keras telegram-bot
Last synced: 25 days ago
JSON representation
Bob Telegram Tools is a python library that allows you to monitor your machine learning methods just by using Telegram without any additional application.
- Host: GitHub
- URL: https://github.com/robertanto/bob_telegram_tools
- Owner: robertanto
- License: gpl-3.0
- Created: 2020-03-22T19:20:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-10T08:02:18.000Z (over 4 years ago)
- Last Synced: 2024-09-30T10:02:57.745Z (about 1 month ago)
- Topics: keras, telegram-bot
- Language: Python
- Homepage: https://robertanto.github.io/bob_telegram_tools/
- Size: 1.25 MB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Bob Telegram Tools is a python library which allows you to monitor your machine learning methods just by using Telegram without any additional application.
Documentation
=============See https://robertanto.github.io/bob_telegram_tools/ for detailed instruction, manuals and tutorials.
Installation instructions
=========================You can install the package with pip:
`pip install bob-telegram-tools`
Getting started
=======
```python
import keras
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import RMSprop
import numpy as npfrom bob_telegram_tools.keras import KerasTelegramCallback
from bob_telegram_tools.bot import TelegramBotX = np.random.rand(1000, 100)
y = (np.random.rand(1000, 3) > 0.5).astype('float32')model = Sequential()
model.add(Dense(512, activation='relu', input_shape=(100,)))
model.add(Dense(512, activation='relu'))
model.add(Dense(3, activation='softmax'))model.compile(loss='categorical_crossentropy',
optimizer=RMSprop(),
metrics=['accuracy'])n_epochs = 3
token = ''
user_id = int('')
bot = TelegramBot(token, user_id)tl = KerasTelegramCallback(bot, epoch_bar=True, to_plot=[
{
'metrics': ['loss', 'val_loss']
},
{
'metrics': ['acc', 'val_acc'],
'title':'Accuracy plot',
'ylabel':'acc',
'ylim':(0, 1),
'xlim':(1, n_epochs)
}
])history = model.fit(X, y,
batch_size=10,
epochs=n_epochs,
validation_split=0.15,
callbacks=[tl])
```License
=======Code released under the [GNU GENERAL PUBLIC LICENSE](https://github.com/robertanto/bob_telegram_tools/tree/master/LICENSE).