├── src ├── tensorgram.egg-info │ ├── dependency_links.txt │ ├── top_level.txt │ ├── requires.txt │ ├── SOURCES.txt │ └── PKG-INFO ├── __pycache__ │ └── tensorgram.cpython-37.pyc └── tensorgram.py ├── Images ├── merged.png ├── start.jpeg ├── chatid.jpeg ├── graphs.jpeg ├── training.jpeg └── tensorgram.gif ├── dist ├── tensorgram-0.0.7.tar.gz └── tensorgram-0.0.7-py3-none-any.whl ├── requirements.txt ├── .github ├── ISSUE_TEMPLATE │ ├── documentation.md │ ├── bug_report.md │ └── feature_request.md └── config.yml ├── setup.py ├── LICENSE ├── CONTRIBUTORS.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md └── README.md /src/tensorgram.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/tensorgram.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | tensorgram 2 | -------------------------------------------------------------------------------- /Images/merged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/Images/merged.png -------------------------------------------------------------------------------- /Images/start.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/Images/start.jpeg -------------------------------------------------------------------------------- /Images/chatid.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/Images/chatid.jpeg -------------------------------------------------------------------------------- /Images/graphs.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/Images/graphs.jpeg -------------------------------------------------------------------------------- /Images/training.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/Images/training.jpeg -------------------------------------------------------------------------------- /Images/tensorgram.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/Images/tensorgram.gif -------------------------------------------------------------------------------- /src/tensorgram.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | keras>=2.4 2 | tensorflow>=2.3 3 | matplotlib>=3.2 4 | requests 5 | -------------------------------------------------------------------------------- /dist/tensorgram-0.0.7.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/dist/tensorgram-0.0.7.tar.gz -------------------------------------------------------------------------------- /dist/tensorgram-0.0.7-py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/dist/tensorgram-0.0.7-py3-none-any.whl -------------------------------------------------------------------------------- /src/__pycache__/tensorgram.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/TensorGram/HEAD/src/__pycache__/tensorgram.cpython-37.pyc -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==1.1.1 2 | gunicorn==19.9.0 3 | itsdangerous==1.1.0 4 | Jinja2==2.10.1 5 | MarkupSafe==1.1.1 6 | Werkzeug==0.15.5 7 | numpy>=1.9.2 8 | scipy>=0.15.1 9 | matplotlib>=1.4.3 10 | pandas>=0.19 11 | urllib3==1.25.10 12 | urlopen==1.0.0 -------------------------------------------------------------------------------- /src/tensorgram.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | README.md 2 | setup.py 3 | src/tensorgram.py 4 | src/tensorgram.egg-info/PKG-INFO 5 | src/tensorgram.egg-info/SOURCES.txt 6 | src/tensorgram.egg-info/dependency_links.txt 7 | src/tensorgram.egg-info/requires.txt 8 | src/tensorgram.egg-info/top_level.txt -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Documentation \U0001F4DA" 3 | about: Suggest improvement in the documenation 4 | title: '' 5 | labels: documentation 6 | assignees: '' 7 | 8 | --- 9 | 10 | # What are the proposed changes 11 | Provides details of the proposed changes 12 | 13 | # Provide a screenshot of the issue and also after resolving the issue 14 | Provide a screenshot for better understanding -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Bug Report \U0001F41B" 3 | about: Create a bug report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Feature request \U0001F386" 3 | about: Suggest an idea for this project to improve 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | with open("README.md", "r") as fh: 4 | long_description = fh.read() 5 | 6 | setuptools.setup( 7 | name="tensorgram", 8 | version="0.0.7", 9 | author="Sai Durga Kamesh Kota", 10 | author_email="ksdkamesh99@gmail.com", 11 | description="A realtime remote service to get the keras callbacks to the telegram including the details of metrics ", 12 | long_description=long_description, 13 | long_description_content_type="text/markdown", 14 | url="https://github.com/ksdkamesh99/TensorGram", 15 | packages=setuptools.find_packages(), 16 | classifiers=[ 17 | "Programming Language :: Python :: 3", 18 | "License :: OSI Approved :: MIT License", 19 | "Operating System :: OS Independent", 20 | ], 21 | python_requires='>=3.6', 22 | py_modules=["tensorgram"], 23 | package_dir={'':'src'}, 24 | install_requires=["keras>=2.4", "tensorflow>=2.3","matplotlib>=3.2","requests"] 25 | 26 | ) 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Sai Durga Kamesh Kota 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for welcome - https://github.com/behaviorbot/welcome 2 | 3 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 4 | # Comment to be posted to on first time issues 5 | 6 | newIssueWelcomeComment: > 7 | Hello there!👋 Welcome to the project!🚀⚡ 8 | 9 | 10 | Thank you and congrats🎉 for opening your very first issue in this project.TensorGram is a realtime remote service to get the keras callbacks to the telegram including the details of metrics. 11 | Kindly 🌟 this repo and follow me. Your Love towards me it truely appreciated. 12 | Please adhere to our [Code of Conduct](https://github.com/ksdkamesh99/TensorGram/blob/main/CONTRIBUTORS.md).🙌 13 | 14 | 15 | 16 | 17 | 18 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 19 | # Comment to be posted to on PRs from first time contributors in your repository 20 | 21 | newPRWelcomeComment: > 22 | Hello there!👋 Welcome to the project!💖 23 | 24 | 25 | Thank you and congrats🎉 for opening your first pull request.✨ TensorGram is a realtime remote service to get the keras callbacks to the telegram including the details of metrics . 26 | Kindly 🌟 this repo and follow me. Your Love towards me it truely appreciated. 27 | Please adhere to our [Code of Conduct](https://github.com/ksdkamesh99/TensorGram/blob/main/CONTRIBUTORS.md).🙌 We will get back to you as soon as we can 😄. 28 | 29 | 30 | 31 | 32 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 33 | # Comment to be posted to on pull requests merged by a first time user 34 | 35 | firstPRMergeComment: > 36 | Congrats on merging your first pull request! 🎉 All the best for your amazing open source journey ahead 🚀. 37 | -------------------------------------------------------------------------------- /src/tensorgram.py: -------------------------------------------------------------------------------- 1 | import keras 2 | from urllib import request 3 | from urllib.parse import quote 4 | import requests 5 | import io 6 | import matplotlib.pyplot as plt 7 | 8 | 9 | class TensorGram(keras.callbacks.Callback): 10 | 11 | def __init__(self,modelname,id): 12 | self.modelname=modelname 13 | self.id=id 14 | self.attributes={} 15 | self.key_attributes=[] 16 | def parse_url(self,t): 17 | t=t.split(' ') 18 | t='%20'.join(t) 19 | return t 20 | def on_train_begin(self, logs=None): 21 | self.text="Model "+self.modelname+" Training Started" 22 | self.text=str(self.text) 23 | url="https://ksdkamesh99.pythonanywhere.com/send?id="+str(self.id)+"&data="+self.parse_url(self.text) 24 | s=request.urlopen(url) 25 | 26 | 27 | def on_train_end(self, logs=None): 28 | self.text="Model "+self.modelname+" Traning Completed" 29 | self.text=str(self.text) 30 | url="https://ksdkamesh99.pythonanywhere.com/send?id="+str(self.id)+"&data="+self.parse_url(self.text) 31 | s=request.urlopen(url) 32 | for i in self.key_attributes: 33 | self.image_buff(self.attributes[i],i) 34 | 35 | def on_epoch_begin(self, epoch, logs=None): 36 | self.text="Model "+self.modelname+" Epoch "+str(epoch+1)+" Running" 37 | self.text=str(self.text) 38 | url="https://ksdkamesh99.pythonanywhere.com/send?id="+str(self.id)+"&data="+self.parse_url(self.text) 39 | s=request.urlopen(url) 40 | 41 | def on_epoch_end(self, epoch, logs=None): 42 | self.text="Model "+self.modelname+" loss after epoch "+str(epoch+1)+" is "+str(logs.get('loss')) 43 | self.text=str(self.text) 44 | if epoch==0: 45 | self.key_attributes=list(logs.keys()) 46 | for i in self.key_attributes: 47 | self.attributes[i]=[] 48 | for i in self.key_attributes: 49 | self.attributes[i].append(logs.get(i)) 50 | url="https://ksdkamesh99.pythonanywhere.com/send?id="+str(self.id)+"&data="+self.parse_url(self.text) 51 | s=request.urlopen(url) 52 | def image_buff(self,attri,title): 53 | plt.figure() 54 | plt.plot(attri) 55 | plt.title(title) 56 | buf = io.BytesIO() 57 | plt.savefig(buf, format='png') 58 | files={'photo':buf.getbuffer()} 59 | url="https://ksdkamesh99.pythonanywhere.com/sendphoto?id="+str(self.id)+"&caption="+title 60 | ss=requests.post(url,files=files) 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | ## Contributors ✨ 2 | 3 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 4 | 5 | 6 | 7 | 8 | 9 | 10 | 19 | 28 | 37 | 46 | 55 | 64 | 65 |
11 | 12 |
13 | ksdkamesh99 14 |

15 | 16 | 👑 💻 👀 💬 Author 17 | 18 |
20 | 21 |
22 | akrish4 23 |

24 | 25 | 📖 26 | 27 |
29 | 30 |
31 | muthuannamalai12 32 |

33 | 34 | 📖 35 | 36 |
38 | 39 |
40 | Sloth-Panda 41 |

42 | 43 | 📖 44 | 45 |
47 | 48 |
49 | ImgBotApp 50 |

51 | 52 | 💻 53 | 54 |
56 | 57 |
58 | tharunc 59 |

60 | 61 | 📖 62 | 63 |
66 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at ksdkamesh99@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available here 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see this 76 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | ## 🤝***First time contributing? We will help you out.*** 👍 3 | 4 | ![GitHub custom open for collaboration](https://img.shields.io/badge/Open%20For-Collaboration-brightgreen?style=for-the-badge) 5 | 6 | Refer to the following articles on the basics of Git and Github and can also contact the Project Mentors, in case you are stuck: 7 | 8 | 9 | - [Getting started with Git and GitHub](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github) 10 | - [Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) 11 | - [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) 12 | - [How to create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github) 13 | 14 | ***If you don't have git on your machine, [install it](https://help.github.com/articles/set-up-git/).*** 15 | 16 | ## 💥 How to Contribute 17 | 18 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 19 | [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/ksdkamesh99/TensorGram) 20 | 21 | - Take a look at the Existing [Issues](https://github.com/ksdkamesh99/TensorGram/issues) or create your own Issues! 22 | - Wait for the Issue to be assigned to you after which you can start working on it. 23 | - Fork the Repo and create a Branch for any Issue that you are working upon. 24 | - Read the [Code of Conduct](https://github.com/ksdkamesh99/TensorGram/blob/main/CODE_OF_CONDUCT.md) 25 | - Create a Pull Request which will be promptly reviewed and suggestions would be added to improve it. 26 | - Add Screenshots to help us know what this Script is all about. 27 | 28 | 29 | 30 | ## ⭐HOW TO MAKE A PULL REQUEST: 31 | 32 | **1.** Fork [this](https://github.com/ksdkamesh99/TensorGram) repository. 33 | Click on the symbol at the top right corner. 34 | 35 | **2.** Clone the forked repository. Open terminal and type: 36 | 37 | ```bash 38 | git clone https://github.com//TensorGram.git 39 | ``` 40 | 41 | **3.** Navigate to the project directory. 42 | 43 | ```bash 44 | cd TensorGram 45 | ``` 46 | 47 | **4.** Make a feature branch 48 | ```bash 49 | git checkout -b 50 | 51 | ``` 52 | **5.** Make changes in source code/ project. 53 | 54 | **6.** Stage your changes and commit 55 | 56 | ```bash 57 | #Add changes to Index 58 | git add . 59 | 60 | #Commit to the local repo 61 | git commit -m "" 62 | ``` 63 | 64 | **7.** Push your local commits to the remote repo. 65 | 66 | ```bash 67 | git push origin 68 | ``` 69 | 70 | **8.** Create a [PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) ! 71 | 72 | **9.** **Congratulations!** Sit and relax, you've made your contribution to [TensorGram](https://github.com/ksdkamesh99/TensorGram) project. 73 | 74 | 75 | ***:trophy: After this, project leaders and mentors will review the changes and will merge your PR if they are found good, otherwise we will suggest the required changes.*** 76 | 77 | ## Style Guides for Git Commit Messages:memo: 78 | 79 | #### Here's a list of some good to have points, that can add more value to your contribution logs. 80 | 81 | - Use the present tense (example: "Add feature" and not "Added feature") 82 | - Use the imperative mood (example: "Move item to...", instead of "Moves item to...") 83 | - Limit the first line (also called subject line) to 50 characters or less 84 | - Capitalize the subject line 85 | - Separate subject from body with a blank line 86 | - Do not end the subject line with a period 87 | - Wrap the body at 72 characters 88 | - Use the body to explain what, why, vs, and how 89 | - Reference issues and pull requests liberally after the first line 90 | 91 | For more detailed reference to the above points, refer here: https://chris.beams.io/posts/git-commit. 92 | 93 | ## 💥 Issues: 94 | For major changes, you are welcomed to open an issue about what you would like to contribute. Enhancements will be appreciated. 95 | 96 | #### All the Best!🥇 97 | 98 |

99 | 100 | built by developers 101 | [![built with love](https://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/ksdkamesh99/TensorGram) 102 |

103 | 104 | -------------------------------------------------------------------------------- /src/tensorgram.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: tensorgram 3 | Version: 0.0.7 4 | Summary: A realtime remote service to get the keras callbacks to the telegram including the details of metrics 5 | Home-page: https://github.com/ksdkamesh99/TensorGram 6 | Author: Sai Durga Kamesh Kota 7 | Author-email: ksdkamesh99@gmail.com 8 | License: UNKNOWN 9 | Description: 10 | A realtime remote service to get the keras callbacks to the telegram including the details of metrics 11 | 12 | 13 |

14 | 15 | Logo 16 | 17 |

18 | 19 | ## Features:- 20 | 21 | 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. 22 | 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. 23 | 3. Updates you get are from a telegram bot. 24 | 25 | ## Installation:- 26 | 27 | You can easily install this telegram using following command. 28 | ``` 29 | pip install tensorgram 30 | ``` 31 | ## Dependencies/Requirements:- 32 | 33 | 1. Keras 34 | 2. Tensorflow 35 | 3. Requests 36 | 4. Matplotlib 37 | 38 | #### Works on python>=3.7 39 | 40 | ## How to use:- 41 | 42 | * Create a nueral network in keras.The sample code is as follows. 43 | ``` 44 | from keras.models import Sequential 45 | from keras.layers import Dense, Dropout, Activation 46 | from keras.optimizers import SGD 47 | import numpy as np 48 | import keras 49 | 50 | X = np.array([[0,0],[0,1],[1,0],[1,1]]) 51 | y = np.array([[0],[1],[1],[0]]) 52 | 53 | model = Sequential() 54 | model.add(Dense(8, input_dim=2)) 55 | model.add(Activation('tanh')) 56 | model.add(Dense(1)) 57 | model.add(Activation('sigmoid')) 58 | 59 | sgd = SGD(lr=0.1) 60 | model.compile(loss='binary_crossentropy', optimizer=sgd,metrics=['accuracy']) 61 | 62 | ``` 63 | 64 | * Now go to Telegram app and search for @tensorgram_bot and join the channel by clicking on the chat. 65 | 66 |

67 | 68 | 69 | 70 |

71 | * 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. 72 | 73 |

74 | 75 | 76 | 77 |

78 | 79 | 80 | * Store it safely as it will be required later. 81 | 82 | * Now we need to import the TensorGram from tensorgram library using following code. 83 | 84 | 85 | ``` 86 | from tensorgram import TensorGram 87 | ``` 88 | 89 | * Now we need to create a object of TensorGram by specifying the following attributes like model name and chat id which you obtained before. 90 | 91 | 92 | ``` 93 | tf=TensorGram("model-name","123456789") 94 | ``` 95 | 96 | * Now you can start training the model and specify the object in the callbacks. 97 | 98 | 99 | ``` 100 | model.fit(X, y, batch_size=1, epochs=10,callbacks=[tf],verbose=1) 101 | ``` 102 | 103 | * Now if you open the telegram app you will find the updates as follows. 104 | 105 | 106 | 107 |

108 | 109 | 110 | 111 |

112 | 113 | 114 | ## Bug / Feature Request:- 115 | 116 | If you find a bug (gave undesired results), kindly open an issue [here](https://github.com/ksdkamesh99/TensorGram/issues/new/choose) by including your search query and the expected result. 117 | 118 | If you'd like to request a new function, feel free to do so by opening an issue [here](https://github.com/ksdkamesh99/TensorGram/issues/new/). Please include sample queries and their corresponding results. 119 | 120 | 121 | ## Licence:- 122 | 123 | This code is licensed under the MIT license, see LICENSE.txt. 124 | 125 | ## Contact:- 126 | For any kind of suggesstions/ help in code Please mail me at ksdkamesh99@gmail.com. 127 | 128 | 129 | 130 | Platform: UNKNOWN 131 | Classifier: Programming Language :: Python :: 3 132 | Classifier: License :: OSI Approved :: MIT License 133 | Classifier: Operating System :: OS Independent 134 | Requires-Python: >=3.6 135 | Description-Content-Type: text/markdown 136 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | A realtime remote service to get the keras callbacks to the telegram including the details of metrics . 2 | 3 | 4 |

5 | 6 | Logo 7 | 8 |

9 | 10 | 11 |

12 | 13 | [![Downloads](https://pepy.tech/badge/tensorgram)](https://pepy.tech/project/tensorgram) 14 | [![License](https://img.shields.io/github/license/ksdkamesh99/TensorGram)](https://github.com/ksdkamesh99/TensorGram/blob/main/LICENSE) 15 | [![Stargazers](https://img.shields.io/github/stars/ksdkamesh99/TensorGram)](https://github.com//ksdkamesh99/TensorGram/stargazers) 16 | [![Issues](https://img.shields.io/github/issues/ksdkamesh99/TensorGram)](https://github.com/thinktocode/COVID-19-Tracker/issues) 17 | [![Contributors](https://img.shields.io/github/contributors/ksdkamesh99/TensorGram)](https://img.shields.io/github/contributors/ksdkamesh99/TensorGram) 18 | [![Top Language](https://img.shields.io/github/languages/top/ksdkamesh99/TensorGram)](https://github.com/thinktocode/COVID-19-Tracker) 19 | [![Pull Request](https://img.shields.io/github/issues-pr/ksdkamesh99/TensorGram)](https://github.com/thinktocode/COVID-19-Tracker/pulls) 20 | [![Forks](https://img.shields.io/github/forks/ksdkamesh99/TensorGram)](https://github.com//ksdkamesh99/TensorGram/network/members) 21 | 22 |

23 | 24 | 25 | ## Features:- 26 | 27 | 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. 28 | 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. 29 | 3. Updates you get are from a telegram bot. 30 | 31 | ## Installation:- 32 | 33 | You can easily install this telegram using following command. 34 | ``` 35 | pip install tensorgram 36 | ``` 37 | ## Dependencies/Requirements:- 38 | 39 | 1. Keras 40 | 2. Tensorflow 41 | 3. Requests 42 | 4. Matplotlib 43 | 44 | #### Works on python>=3.7 45 | 46 | ## How to use:- 47 | 48 | * Create a neural network in keras.The sample code is as follows. 49 | ``` 50 | import tensorflow 51 | from tensorflow.keras.models import Sequential 52 | from tensorflow.keras.layers import Dense, Dropout, Activation 53 | import numpy as np 54 | from tensorflow.keras.optimizers import SGD 55 | 56 | X = np.array([[0,0],[0,1],[1,0],[1,1]]) 57 | y = np.array([[0],[1],[1],[0]]) 58 | 59 | model = Sequential() 60 | model.add(Dense(8, input_dim=2)) 61 | model.add(Activation('tanh')) 62 | model.add(Dense(1)) 63 | model.add(Activation('sigmoid')) 64 | 65 | sgd = SGD(learning_rate=0.1) 66 | model.compile(loss='binary_crossentropy', optimizer=sgd,metrics=['accuracy']) 67 | 68 | 69 | 70 | ``` 71 | 72 | * Now go to Telegram app and search for @tensorgram_bot and join the channel by clicking on the chat. 73 | 74 |

75 | 76 | 77 | 78 |

79 | * 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. 80 | 81 |

82 | 83 | 84 | 85 |

86 | 87 | 88 | * Store it safely as it will be required later. 89 | 90 | * Now we need to import the TensorGram from tensorgram library using following code. 91 | 92 | 93 | ``` 94 | from tensorgram import TensorGram 95 | ``` 96 | 97 | * Now we need to create a object of TensorGram by specifying the following attributes like model name and chat id which you obtained before. 98 | 99 | 100 | ``` 101 | tf=TensorGram("model-name","123456789") 102 | ``` 103 | 104 | * Now you can start training the model and specify the object in the callbacks. 105 | 106 | 107 | ``` 108 | model.fit(X, y, batch_size=1, epochs=10,callbacks=[tf],verbose=1) 109 | ``` 110 | 111 | * Now if you open the telegram app you will find the updates as follows. 112 | 113 | 114 | 115 |

116 | 117 | 118 | 119 |

120 | 121 | 122 | ## Bug / Feature Request:- 123 | 124 | If you find a bug (gave undesired results), kindly open an issue [here](https://github.com/ksdkamesh99/TensorGram/issues/new/choose) by including your search query and the expected result. 125 | 126 | If you'd like to request a new function, feel free to do so by opening an issue [here](https://github.com/ksdkamesh99/TensorGram/issues/new/). Please include sample queries and their corresponding results. 127 | 128 | ## 💥 How to Contribute ? 129 | - If you wish to contribute kindly check the [CONTRIBUTING.md](https://github.com/ksdkamesh99/TensorGram/blob/main/CONTRIBUTING.md)🤝 130 | 131 | ## ❤️ Thanks to our awesome contributors ✨✨ 132 | 133 | 134 | 135 | 140 | 141 |
136 | 137 | 138 | 139 |
142 | 143 | [CONTRIBUTORS.md](/CONTRIBUTORS.md) 144 | 145 | 146 | 147 | ## Code of Conduct 148 | 149 | You can find our Code of Conduct [here](/CODE_OF_CONDUCT.md). 150 | 151 | 152 | ## Open-source Programs 153 | 154 | 155 | Winter of Code is an open-source program envisioned by DevScript that helps understand the paradigm of Open Source contribution. It aims to bring students into the world of open source development and see the power of unified problem solving in real time. 156 | 157 | 158 | ## License 159 | 160 | This project follows the [MIT License](/LICENSE). 161 | 162 | ## Contact:- 163 | For any kind of suggesstions/ help in code Please mail me at ksdkamesh99@gmail.com. 164 | 165 | 166 | --------------------------------------------------------------------------------