{"action":"created","issue":{"url":"https://api.github.com/repos/aigamedev/scikit-neuralnetwork/issues/196","repository_url":"https://api.github.com/repos/aigamedev/scikit-neuralnetwork","labels_url":"https://api.github.com/repos/aigamedev/scikit-neuralnetwork/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/aigamedev/scikit-neuralnetwork/issues/196/comments","events_url":"https://api.github.com/repos/aigamedev/scikit-neuralnetwork/issues/196/events","html_url":"https://github.com/aigamedev/scikit-neuralnetwork/issues/196","id":146438917,"number":196,"title":"Inject Noise in Training Samples in an Online Fashion","user":{"login":"pGit1","id":13975114,"avatar_url":"https://avatars.githubusercontent.com/u/13975114?v=3","gravatar_id":"","url":"https://api.github.com/users/pGit1","html_url":"https://github.com/pGit1","followers_url":"https://api.github.com/users/pGit1/followers","following_url":"https://api.github.com/users/pGit1/following{/other_user}","gists_url":"https://api.github.com/users/pGit1/gists{/gist_id}","starred_url":"https://api.github.com/users/pGit1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pGit1/subscriptions","organizations_url":"https://api.github.com/users/pGit1/orgs","repos_url":"https://api.github.com/users/pGit1/repos","events_url":"https://api.github.com/users/pGit1/events{/privacy}","received_events_url":"https://api.github.com/users/pGit1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-06T21:21:00Z","updated_at":"2016-04-12T18:46:36Z","closed_at":null,"body":"Hi, \r\n\r\nI was wondering if there was a way to inject masking noise (or any other distortion) in an online fashion while training the net. Currently I add noise to the training set prior to training but if samples could be mutated at the end of each training epoch for instance or the end of a batch pass that would be awesome. This package is awesome! Im not saying it cant do it, I just need a little help figuring it out. "},"comment":{"url":"https://api.github.com/repos/aigamedev/scikit-neuralnetwork/issues/comments/209049773","html_url":"https://github.com/aigamedev/scikit-neuralnetwork/issues/196#issuecomment-209049773","issue_url":"https://api.github.com/repos/aigamedev/scikit-neuralnetwork/issues/196","id":209049773,"user":{"login":"pGit1","id":13975114,"avatar_url":"https://avatars.githubusercontent.com/u/13975114?v=3","gravatar_id":"","url":"https://api.github.com/users/pGit1","html_url":"https://github.com/pGit1","followers_url":"https://api.github.com/users/pGit1/followers","following_url":"https://api.github.com/users/pGit1/following{/other_user}","gists_url":"https://api.github.com/users/pGit1/gists{/gist_id}","starred_url":"https://api.github.com/users/pGit1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pGit1/subscriptions","organizations_url":"https://api.github.com/users/pGit1/orgs","repos_url":"https://api.github.com/users/pGit1/repos","events_url":"https://api.github.com/users/pGit1/events{/privacy}","received_events_url":"https://api.github.com/users/pGit1/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T18:46:36Z","updated_at":"2016-04-12T18:46:36Z","body":"Also will this work to add noise and reset the data appropriately. Im trying to work around the native issue:\r\n\r\n`def inject_noise(Xb,**others):\r\n    gauss_noise = np.random.normal(0,1,size=Xb.shape)\r\n    Xb[:] = Xb+gauss_noise\r\n    \r\ndef reset_data(X,**others):\r\n    X[:] = X` \r\n\r\nand \r\n\r\n`callback={'on_batch_start': inject_noise,'on_epoch_finish': reset_data}`\r\n\r\nThe network works fine when I run this code but I wonder if this is actually corrupting each batch before learning and then resetting ALL the data (batches) back to normal before the next epoch. \r\n\r\nThanks for your help Alex."}}