Skip to main content

A realtime remote service to get the keras callbacks to the telegram including the details of metrics

Logo

Features:-

  1. It helps by getting the updates of your model including metrics and loss function graphs which help user the view and get to a statistical conclusion about the model remotely.
  2. It is a biggest advantage for the users who need not spend hours and hours infront of system for watching the updates of the model.
  3. Updates you get are from a telegram bot.

Installation:-

You can easily install this telegram using following command.

pip install tensorgram

Dependencies/Requirements:-

  1. Keras
  2. Tensorflow
  3. Requests
  4. Matplotlib

Works on python>=3.7

How to use:-

  • Create a nueral network in keras.The sample code is as follows.
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation
from keras.optimizers import SGD
import numpy as np 
import keras

X = np.array([[0,0],[0,1],[1,0],[1,1]])
y = np.array([[0],[1],[1],[0]])

model = Sequential()
model.add(Dense(8, input_dim=2))
model.add(Activation('tanh'))
model.add(Dense(1))
model.add(Activation('sigmoid'))

sgd = SGD(lr=0.1)
model.compile(loss='binary_crossentropy', optimizer=sgd,metrics=['accuracy'])

  • Now go to Telegram app and search for @tensorgram_bot and join the channel by clicking on the chat.

* This application send you the data based on the unique chat id for every user in telegram. So to get your chat id you need to go to search and type @chatid_echo_bot and click on start to get your unique chat id.

  • Store it safely as it will be required later.

  • Now we need to import the TensorGram from tensorgram library using following code.

from tensorgram import TensorGram
  • Now we need to create a object of TensorGram by specifying the following attributes like model name and chat id which you obtained before.
tf=TensorGram("model-name","123456789")
  • Now you can start training the model and specify the object in the callbacks.
model.fit(X, y, batch_size=1, epochs=10,callbacks=[tf],verbose=1)
  • Now if you open the telegram app you will find the updates as follows.

Bug / Feature Request:-

If you find a bug (gave undesired results), kindly open an issue here by including your search query and the expected result.

If you'd like to request a new function, feel free to do so by opening an issue here. Please include sample queries and their corresponding results.

Licence:-

This code is licensed under the MIT license, see LICENSE.txt.

Contact:-

For any kind of suggesstions/ help in code Please mail me at ksdkamesh99@gmail.com.

Metadata

Release files for tensorgram 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tensorgram 0.0.7
File Size Uploaded Provenance
tensorgram-0.0.7.tar.gz 3.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tensorgram 0.0.7
File Interpreter ABI Platform
tensorgram-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / tensorgram-0.0.7.tar.gz

Download URL tensorgram-0.0.7.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a124b26b9963a6819ed24877a1becedf8d8e06e72609670a6c2d1f99dbd71ede
BLAKE2b-256 checksum
How to use checksums
f2ca1831a513aa0fb897c9bcaa384560ec22e488526dd18a25535c9dad784900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Release files / tensorgram-0.0.7-py3-none-any.whl

Download URL tensorgram-0.0.7-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87b24c769de9a7f71fa2daf682ee3172f7a8a1ece349c24cf7b7f9a088c3efc8
BLAKE2b-256 checksum
How to use checksums
c8a574250310ac8537bb799ef7a19f955f3d6ede336a9958dfada46ebbc078d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Security for tensorgram 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page