Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lack of mnist.py #40

Open
whubaichuan opened this issue Nov 2, 2023 · 6 comments
Open

lack of mnist.py #40

whubaichuan opened this issue Nov 2, 2023 · 6 comments
Labels

Comments

@whubaichuan
Copy link

Hi, in this test file,

import mnist

but no module named mnist.

I guess probably that some directory or files named as mnist.py is missing?

@gmontamat
Copy link
Owner

hi @whubaichuan take a look at requirements.txt, it's a dependency:
pip install mnist==0.2.2

@gmontamat
Copy link
Owner

gmontamat commented Nov 2, 2023

In the dev branch I'm dropping the use of this lib to get the mnist dataset but it's still a WIP.

@whubaichuan
Copy link
Author

whubaichuan commented Nov 2, 2023

@gmontamat hi thanks. However, when I install all the libraries (especially tensorflow 1.15.4), run the test_mnist.py. I still have the problem below:

  File "gentun-master/tests/test_mnist.py", line 60, in <module>
    ga.run(2)
  File "gentun-master/gentun/algorithms.py", line 29, in run
    self.evolve_population()
  File "gentun-master/gentun/algorithms.py", line 72, in evolve_population
    fittest = self.population.get_fittest()
  File "gentun-master/gentun/populations.py", line 57, in get_fittest
    return max(self.individuals, key=operator.methodcaller('get_fitness'))
  File "gentun-master/gentun/individuals.py", line 91, in get_fitness
    self.evaluate_fitness()
  File "gentun-master/gentun/individuals.py", line 259, in evaluate_fitness
    self.fitness = model.cross_validate()
  File "gentun-master/gentun/models/keras_models.py", line 135, in cross_validate
    self.reset_weights()
  File "gentun-master/gentun/models/keras_models.py", line 125, in reset_weights
    layer.kernel.initializer.run(session=session)
AttributeError: 'NoneType' object has no attribute 'run'```

@whubaichuan
Copy link
Author

@gmontamat hi, the output of pip freeze is:

astor==0.7.1
gast==0.2.2
gentun==0.0.1
google-pasta==0.2.0
grpcio==1.20.1
h5py==2.9.0
importlib-metadata==6.7.0
Keras==2.2.4
Keras-Applications==1.0.7
Keras-Preprocessing==1.0.9
Markdown==3.1
MarkupSafe==2.1.3
mnist==0.2.2
mock==3.0.4
numpy==1.16.3
opt-einsum==3.3.0
packaging==23.2
pika==1.0.1
plotly==5.18.0
protobuf==3.7.1
PyYAML==5.4
scikit-learn==0.20.3
scipy==1.2.1
six==1.12.0
tenacity==8.2.3
tensorboard==1.13.1
tensorflow==1.15.4
tensorflow-estimator==1.13.0
termcolor==1.1.0
typing_extensions==4.7.1
Werkzeug==0.15.3
wrapt==1.15.0
xgboost==0.82
zipp==3.15.0```

@gmontamat
Copy link
Owner

Looks like I need to update the libs, I tried replicating the environment in python3.8 and tf1.x is no longer supported.

@whubaichuan
Copy link
Author

@gmontamat Thanks, gmontamat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants