{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/1253","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/1253/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/1253/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/1253/events","html_url":"https://github.com/dmlc/mxnet/issues/1253","id":126328217,"number":1253,"title":"Running Adam optimizer error","user":{"login":"rfarouni","id":9895004,"avatar_url":"https://avatars.githubusercontent.com/u/9895004?v=3","gravatar_id":"","url":"https://api.github.com/users/rfarouni","html_url":"https://github.com/rfarouni","followers_url":"https://api.github.com/users/rfarouni/followers","following_url":"https://api.github.com/users/rfarouni/following{/other_user}","gists_url":"https://api.github.com/users/rfarouni/gists{/gist_id}","starred_url":"https://api.github.com/users/rfarouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfarouni/subscriptions","organizations_url":"https://api.github.com/users/rfarouni/orgs","repos_url":"https://api.github.com/users/rfarouni/repos","events_url":"https://api.github.com/users/rfarouni/events{/privacy}","received_events_url":"https://api.github.com/users/rfarouni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-13T02:49:36Z","updated_at":"2016-01-13T05:32:24Z","closed_at":null,"body":"Hi,\r\n\r\nWhen I change the optimizer to Adam. For example,\r\n``` python\r\nmodel = mx.model.FeedForward(\r\n        ctx                = [mx.gpu(0)],\r\n        num_epoch     = 60,\r\n        symbol            = network,\r\n        optimizer        =  'adam',\r\n        initializer        = mx.init.Xavier(factor_type=\"in\", magnitude=2.34))\r\n\r\nmodel.fit(X= data_train)   \r\n```\r\nI get the following error message:\r\n\r\n```python\r\n  File \"<ipython-input-6-3732cc3a7cd0>\", line 2, in <module>\r\n    X                  = data_train)\r\n  File \"/home/rick/anaconda/lib/python2.7/site-packages/mxnet-0.5.0-py2.7.egg/mxnet/model.py\", line 641, in fit\r\n    **(self.kwargs))\r\n  File \"/home/rick/anaconda/lib/python2.7/site-packages/mxnet-0.5.0-py2.7.egg/mxnet/optimizer.py\", line 52, in create_optimizer\r\n    **kwargs)\r\nTypeError: __init__() got an unexpected keyword argument 'arg_names'\r\n```\r\nIsn't this the correct way of setting the optimizer?\r\n"},"comment":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/comments/171175612","html_url":"https://github.com/dmlc/mxnet/issues/1253#issuecomment-171175612","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/1253","id":171175612,"user":{"login":"sxjscience","id":5178350,"avatar_url":"https://avatars.githubusercontent.com/u/5178350?v=3","gravatar_id":"","url":"https://api.github.com/users/sxjscience","html_url":"https://github.com/sxjscience","followers_url":"https://api.github.com/users/sxjscience/followers","following_url":"https://api.github.com/users/sxjscience/following{/other_user}","gists_url":"https://api.github.com/users/sxjscience/gists{/gist_id}","starred_url":"https://api.github.com/users/sxjscience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxjscience/subscriptions","organizations_url":"https://api.github.com/users/sxjscience/orgs","repos_url":"https://api.github.com/users/sxjscience/repos","events_url":"https://api.github.com/users/sxjscience/events{/privacy}","received_events_url":"https://api.github.com/users/sxjscience/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T05:32:24Z","updated_at":"2016-01-13T05:32:24Z","body":"Seems the `__init__` function of the Adam optimizer has no `arg_names` keyword.\r\n\r\nDoes the following revision help? In https://github.com/dmlc/mxnet/blob/master/python/mxnet/optimizer.py#L348, add `arg_names = None` after `lr_schedule = None` and change https://github.com/dmlc/mxnet/blob/master/python/mxnet/optimizer.py#L349 to `super(Adam, self).__init__(rescale_grad, arg_names)`"}}