{"action":"created","issue":{"url":"https://api.github.com/repos/deepchem/deepchem/issues/1171","repository_url":"https://api.github.com/repos/deepchem/deepchem","labels_url":"https://api.github.com/repos/deepchem/deepchem/issues/1171/labels{/name}","comments_url":"https://api.github.com/repos/deepchem/deepchem/issues/1171/comments","events_url":"https://api.github.com/repos/deepchem/deepchem/issues/1171/events","html_url":"https://github.com/deepchem/deepchem/issues/1171","id":307003458,"number":1171,"title":"Training DeepChem Models in Eager Mode","user":{"login":"rbharath","id":1057676,"avatar_url":"https://avatars3.githubusercontent.com/u/1057676?v=4","gravatar_id":"","url":"https://api.github.com/users/rbharath","html_url":"https://github.com/rbharath","followers_url":"https://api.github.com/users/rbharath/followers","following_url":"https://api.github.com/users/rbharath/following{/other_user}","gists_url":"https://api.github.com/users/rbharath/gists{/gist_id}","starred_url":"https://api.github.com/users/rbharath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbharath/subscriptions","organizations_url":"https://api.github.com/users/rbharath/orgs","repos_url":"https://api.github.com/users/rbharath/repos","events_url":"https://api.github.com/users/rbharath/events{/privacy}","received_events_url":"https://api.github.com/users/rbharath/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-20T19:17:57Z","updated_at":"2018-03-20T19:46:24Z","closed_at":null,"author_association":"OWNER","body":"Following discussion in #1158, it's looking like it will take a good bit more effort to train DeepChem models in Eager mode. Let's use this issue to coordinate discussion of the steps we need to take.\r\n\r\nhttps://github.com/tensorflow/models/blob/master/official/mnist/mnist_eager.py provides an example of training an MNIST eager model. The model itself is defined in https://github.com/tensorflow/models/blob/master/official/mnist/mnist.py and looks to be a subclass of `tf.keras.Model`.\r\n\r\nIs it possible to train our existing model objects directly in Eager mode or will we need to make them inherit `tf.keras.Model`?"},"comment":{"url":"https://api.github.com/repos/deepchem/deepchem/issues/comments/374732307","html_url":"https://github.com/deepchem/deepchem/issues/1171#issuecomment-374732307","issue_url":"https://api.github.com/repos/deepchem/deepchem/issues/1171","id":374732307,"user":{"login":"peastman","id":4379786,"avatar_url":"https://avatars3.githubusercontent.com/u/4379786?v=4","gravatar_id":"","url":"https://api.github.com/users/peastman","html_url":"https://github.com/peastman","followers_url":"https://api.github.com/users/peastman/followers","following_url":"https://api.github.com/users/peastman/following{/other_user}","gists_url":"https://api.github.com/users/peastman/gists{/gist_id}","starred_url":"https://api.github.com/users/peastman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peastman/subscriptions","organizations_url":"https://api.github.com/users/peastman/orgs","repos_url":"https://api.github.com/users/peastman/repos","events_url":"https://api.github.com/users/peastman/events{/privacy}","received_events_url":"https://api.github.com/users/peastman/received_events","type":"User","site_admin":false},"created_at":"2018-03-20T19:46:24Z","updated_at":"2018-03-20T19:46:24Z","author_association":"CONTRIBUTOR","body":"Take a look at https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/layers/base.py and search for occurrences of \"eager\".  You'll find first that the Tensorflow layer classes have a lot of code specifically to deal with eager mode, and second that a lot of that code is to throw exceptions when people try to use features that aren't currently supported!\r\n\r\nAnyway, Tensorflow layers work a bit differently from TensorGraph ones.  In Tensorflow, `build()` constructs the variables and then `call()` creates the tensors to do the calculation (or in eager mode, just does the calculation).  TensorGraph combines both of those into a single method, so you can't perform the calculation without also recreating the variables.  We would need to split those apart."}}
{"actor":{"display_login":"peastman"}}