tomMoral / AdaptiveOptim

Adaptive optimization procedure
16 stars 8 forks source link

Error while running NIPS_figures.py #1

Closed sadjadasghari closed 7 years ago

sadjadasghari commented 7 years ago

I use the cmd : python NIPS_figures.py --data artificial --save_dir layer1

and I get the error:

 Traceback (most recent call last):
  File "NIPS_figures.py", line 305, in <module>
    lr_init=lr_init/n_layers)
  File "/Users/Sadjad/git/AdaptiveOptim/Lcod/facto_network.py", line 226, in train
    self._feed_val = self._convert_feed(feed_val)
  File "/Users/Sadjad/git/AdaptiveOptim/Lcod/_loptim_network.py", line 305, in _convert_feed
    for k, v in feed.items():
AttributeError: 'int' object has no attribute ‘items' 

The modifications I made to the code (I am running this on mac OS, so I don’t have GPU): Since I have my tensorflow installed with python2.7.13, I had to replace:

I have numpy 1.12.0, matplotlib 1.5.3, and sklearn 0.17.1

tomMoral commented 7 years ago

Ok I just pushed some changed I made a while ago, which permits to run with tensorflow 1.0+ Can you try with the up to date version of the code?

Also, can you tell me which version of tensorflow you are running and are you using the GPU. Also can you paste the full output (with the steps already done?)

tomMoral commented 7 years ago

Ok sorry!!! I just realized the order of the argument in network.train was off. The last commit 5b0184df362bceb1293164274101be54b5747346 shoudl fix it. Let me know if you can run it with the new version of the repo!

sadjadasghari commented 7 years ago

I was able to run the code with new version, thank you! Also, I was using tensorflow 0.11 and python 2.7.13, so I needed to make some changes (like super() function as I mentioned). I was running on CPU on a Mac. Fixing the order of arguments in network.train fixed the issue. Thank you, Best.

tomMoral commented 7 years ago

Great! I am closing this issue then.