lzrobots / DeepEmbeddingModel_ZSL

Tensorflow code for CVPR 2017 paper: Learning a Deep Embedding Model for Zero-Shot Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'generator' object has no attribute 'next'

GanAndreas opened this issue · comments

Hi, I'm new in Zero_shot Learning and i'm facing a problem here

I tried to implement the AwA_Attribute.py

and I get this respond:

File "AwA_attribute.py", line 125, in
att_batch_val, visual_batch_val = iter_.next()
AttributeError: 'generator' object has no attribute 'next'

commented

@GanAndreas Maybe python2 instead of python3

yes, I already found that problem.
I'm using anaconda
already tried to install python 2,7
but when I install the tensorflow 1.1.0, it would replace the python into 3.6.7

commented

I have successfully run the code without error.
After creating a new python environment using conda, install tensorflow by pip.
Like this:

conda create -n your_env_name  pip python=2.7
source activate your_env_name
pip install --ignore-installed --upgrade tensorflow_url_for_py2.7

oooh i see.
I tried on windows before
thanks alot mate!
Cheers