question on sample code

Solved!
Posted in General by kwang nam Mon Jul 27 2015 15:39:49 GMT+0000 (UTC)·14·Viewed 1,648 times

on your sample code you did from opendeep.data.dataset import TEST but the TEST is not under dataset package I found "opendeeptest.MNIST.test_inputs" Is it right ? but I got the same error again Traceback (most recent call last): File "E:\project_luna\cuda\open_deep\test\opendeeptest2.py", line 7, in <module> from test import opendeeptest File "E:\project_luna\cuda\open_deep\test\opendeeptest.py", line 39, in <module> dae = DenoisingAutoencoder(**config) File "F:\python34\python-3.4.3.amd64\lib\site-packages\opendeep-0.0.9a0-py3.4.egg\opendeep\models\single_layer\autoencoder.py", line 152, in __init__ **{arg: val for (arg, val) in locals().iteritems() if arg is not 'self'} AttributeError: 'dict' object has no attribute 'iteritems'
Markus Beissinger
July 27, 2015

These errors should be fixed in the newest version on GitHub!


Markus Beissinger marked this as solved
Andrew Fibert
Dec 5, 2015

We are using new version, but still having the same problem.

Andrew Fibert
Dec 5, 2015

We are using new version, but still having the same problem.

Nach
Dec 5, 2015

Same here man ... today....

Markus Beissinger
Dec 5, 2015

what is the error?

Nach
Dec 5, 2015

@Andrew Did you get any solution? please let me know... I'll let u know if I find something.

Andrew Fibert
Dec 5, 2015

from opendeep.data.dataset import TEST
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name TEST

from opendeeptest.MNIST.test_inputs import TEST
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named opendeeptest.MNIST.test_inputs

Nach
Dec 5, 2015

Traceback (most recent call last):

File "<ipython-input-35-49e537832e1a>", line 61, in <module>
from opendeep.data.dataset import TEST

ImportError: cannot import name TEST

Markus Beissinger
Dec 5, 2015

I can't find that import statement anywhere in code in the OpenDeep package, are you referencing the container announcement post?

Andrew Fibert
Dec 5, 2015

Hi Markus,

I am referring the code given at below link;
Link: http://www.opendeep.org/v0.0.5/docs/tutorial-your-first-model

The statement is in the main module, attaching the snippet,

if name == 'main':

# set up the logging environment to display outputs (optional)
# although this is recommended over print statements everywhere
import logging
from opendeep.log.logger import config_root_logger
config_root_logger()
log = logging.getLogger(__name__)
log.info("Creating a Denoising Autoencoder!")

# import the dataset and optimizer to use
from opendeep.data.dataset import TEST
from opendeep.data.standard_datasets.image.mnist import MNIST
from opendeep.optimization.adadelta import AdaDelta

Thanks in advance for quick replies....

Markus Beissinger
Dec 5, 2015

Ah ok - that is an old version of the documentation (v0.0.5) we are on v0.0.9 now so that tutorial doesn't work with the newest opendeep. I should be able to rewrite that tutorial for the new version later this week (going to be at NIPS in Montreal so it will be during downtime). The main difference is that models no longer specify their cost function - that is a parameter given to the optimizer. Also the dataset behaves slightly differently. If you want references for building a model from scratch in the meantime, check out the source code for Dense layer here: https://github.com/vitruvianscience/OpenDeep/blob/master/opendeep/models/single_layer/basic.py

Nach
Dec 6, 2015

Thanks a lot Markus! All the best for NIPS!
Will try from my side....

Andrew Fibert
Dec 6, 2015

Hi Markus,

Can you please share us the old opendeep commit from the repository for which the given documentation works out?
The reference link posted above does not have TEST function. Any help would be great.

Thanks!!

Markus Beissinger
Dec 6, 2015

It was quite a while ago - here is a commit that will most likely work (haven't tested the example with it specifically) https://github.com/vitruvianscience/OpenDeep/tree/2f138c8c35f1ed8b62a3a4d779fd45520644ce36

Markdown is allowed