{"id":16739599,"url":"https://github.com/abhilash1910/deepgenerator","last_synced_at":"2026-05-19T17:12:49.576Z","repository":{"id":62567405,"uuid":"254665170","full_name":"abhilash1910/DeepGenerator","owner":"abhilash1910","description":"Sentence Sequence Transduction Library (Seq to Seq) for text generation using sequential generative Vanilla RNN using numpy  ","archived":false,"fork":false,"pushed_at":"2020-08-24T19:42:55.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T10:09:20.109Z","etag":null,"topics":["adagrad","generativemodeling","nlp","numpy","optimizer","rnn","seq2seq-model","transduction","vanilla-rnn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhilash1910.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-10T15:10:09.000Z","updated_at":"2020-08-24T19:42:58.000Z","dependencies_parsed_at":"2022-11-03T16:30:27.937Z","dependency_job_id":null,"html_url":"https://github.com/abhilash1910/DeepGenerator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FDeepGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FDeepGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FDeepGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FDeepGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhilash1910","download_url":"https://codeload.github.com/abhilash1910/DeepGenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243802807,"owners_count":20350300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adagrad","generativemodeling","nlp","numpy","optimizer","rnn","seq2seq-model","transduction","vanilla-rnn"],"created_at":"2024-10-13T00:52:22.909Z","updated_at":"2026-05-19T17:12:49.546Z","avatar_url":"https://github.com/abhilash1910.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepGenerator :pushpin:\nSentence Sequence Transduction Library (Seq to Seq) for text generation using sequential generative Vanilla RNN using numpy  \nThe library is a generative network built purely in numpy and matplotlib. The library is a sequence to sequence transduction\nlibrary for generating n sequence texts from given corpus. Metrics for accuracy-BLEU has provided a considerable accuracy metric\nfor epochs greater than 20000.The library is sequential and includes intermediate tanh activation in the intermediate stages with \nsoftmax cross entropy loss ,and generalised Adagrad optimizer.\n# Installation:\n\n```python\npip install DeepGenerator\n```\n\n# library facts:\n\ninitialization:  \n```python\n  \n        \nimport DeepGenerator.DeepGenerator as dg\n```        \nObject Creation:\n\n```python\ndeepgen=dg.DeepGenerator()\n```\n\n\n# Functions: \n     1.attributes for users- learning rate,epochs,local path of data storage(text format),number of hidden layers,kernel size,sequence/step size,count of next words\n      2.data_abstract function- Takes arguements (self,path,choice) - \n                                path= local path of text file\n                                choice= 'character_generator' for character generation network\n                                        'word_generator' for word generator network\n                                Returns data\n                                Usage- ouput_data=deepgen.data_preprocess(DeepGenerator.path,DeepGenerator.choice)\n      3.data_preprocess function- Takes arguements (self,path,choice)-\n                                path= local path of text file\n                                choice= 'character_generator' for character generation network\n                                        'word_generator' for word generator network\n                                Returns data,data_size,vocab_size,char_to_idx,idx_to_char\n                                Usage- data,data_size,vocab_size,char_to_idx,idx_to_char=deepgen.data_preprocess(DeepGenerator.path,DeepGenerator.choice)\n      4.hyperparameters function-Takes arguements (self,hidden_layers_size,no_hidden_layers,learning_rate,step_size,vocab_size)-\n                                hidden_layers-kernel size-recommended under 2048\n                                no_hidden_layers- sequential intermediate layers\n                                learning_rate- learning_rate (range of 1e-3)\n                                step_size- sequence length(should be \u003c= vocab_size)\n                                vocab_size\n                                Returns hidden_layers,learning_rate,step_size,hid_layer,Wxh,Whh1,Whh_vector,Whh,Why,bh1,bh_vector,bh,by\n                                Usage- hidden_layers,learning_rate,step_size,hid_layer,Wxh,Whh1,Whh_vector,Whh,Why,bh1,bh_vector,bh,by=deepgen.hyperparamteres(dg.hidden_layers_size,dg.no_hidden_layers,dg.learning_rate,dg.step_size,dg.vocab_size)\n      5. loss_evaluation function- Takes arguements    (self,inp,target,h_previous,hidden_layers,hid_layer,Wxh,Wh1,Whh_vector,Whh,Why,bh1,bh_vector,bh,by) -\n                                inp= character to indices encoded dictionary of input text\n                                target=character to indices encoded dictionary of generated text\n                                h_previous-value of hidden layer for previous state\n                                hidden_layers-kernel size\n                                hid_layer-sequential hidden layers\n                                ---------- sequential layers---------\n                                       -----weight tensors------\n                                Wxh- weight tensor of input to first hidden layer\n                                Wh1- weight tensor of first hidden layer to first layer of sequential network\n                                Whh_vector-weight tensors of intermediate sequential network\n                                Whh- weight tensor of last sequential to last hidden layer\n                                Why-weight tensor of last hidden layer to output layer\n                                        -----bias tensors-------\n                                bh1-bias of first hidden layer\n                                bh_vector-bias of intermediate sequential layers\n                                bhh-bias of end hidden layer\n                                by-bias at output\n                                \n                                Returns loss,dWxh,dWhh1,dWhh_vector,dWhh,dWhy,dbh1,dbh_vector,dbh,dby,h_state[len(inp)-1],Whh1,Whh_vector,Whh,Why,bh1,bh_vector,bh,by\n                                Usage loss,dWxh,dWhh1,dWhh_vector,dWhh,dWhy,dbh1,dbh_vector,dbh,dby,h_state[len(inp)-1],Whh1,Whh_vector,Whh,Why,bh1,bh_vector,bh,by=deepgen.loss_evaluation(dg.inp,dg.target,dg.h_previous,dg.hidden_layers,dg.hid_layer,dg.Wxh,dg.Wh1,dg.Whh_vector,dg.Whh,dg.Why,dg.bh1,dg.bh_vector,dg.bh,dg.by)\n      6.start_predict function-Takes arguements (self,count,epochs,Wh1,Whh_vector,Whh,Why,bh1,bh_vector,bh,by,hid_layer,char_to_idx,idx_to_char,vocab_size,learning_rate,step_size,data,hidden_layers)\n                                counts-count of sequences to generate\n                                epochs-epochs\n                                Whi -weight tensors\n                                bhi-bias tensors\n                                hid_layer-no of sequential layers\n                                char_to_idx-character to index encoder\n                                idx_to_char-index to character decoder\n                                vocab_size-vocab_size\n                                learning_rate-learning_rate\n                                step_size-sequence length\n                                hidden_layers-kernel size\n                                Returns epochs,gradient losses vector -Beta release(out_txt_vector -vector of putput generated sentences  - *() implies not yet shipped to pypi)\n                                Usage-epochs,gradient_loss,*(out_txt_vector)=deepgen.start_predict(dg.count,dg.epochs,dg.Whh1,dg.Whh_vector,dg.Whh,dg.Why,dg.bh1,dg.bh_vector,dg.bh,dg.by,dg.hid_layer,dg.char_to_idx,dg.idx_to_char,dg.vocab_size,dg.learning_rate,dg.step_size,dg.data,dg.hidden_layers) \n       7.output_sample function- Takes arguements (self,h1,seed_ix,n,vocab_size,Wh1,Whh_vector,Whh,Why,bh1,bh_vector,bh,by,hid_layer)-\n                                h1-hidden layer previous state\n                                seed_ix-starting point for generation\n                                n-count of text to generate\n                                Whi-weight tensor\n                                bhi-bias tensor\n                                hid_layer-no of sequential layers\n                                Returns ixs- integer vector of maximum probability characters/words\n                                Usage-ixs=deepgen.output_sample(dg.h1,dg.seed_ix,dg.n,dg.vocab_size,dg.Wh1,dg.Whh_vector,dg.Whh,dg.Why,dg.bh1,dg.bh_vector,dg.bh,dg.by,dg.hid_layer)\n       8.plot_loss function  -Takes arguements(self,epochs,gradient_loss)-\n                              epochs-epoch vector\n                              gradient_loss- gradient loss vector\n                              Returns void\n                              Usage-deepgen.plot_loss(dg.epoch,dg.gradient_loss)\n# Usage-\nThe file sample.py contains the usage specification and syntax for generating text\nJupyter notebook -Deepgen.ipynb is also present as a sample with different text files.\n\n# Library link:\nhttps://pypi.org/project/DeepGenerator/0.1/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhilash1910%2Fdeepgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhilash1910%2Fdeepgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhilash1910%2Fdeepgenerator/lists"}