Coder Social home page Coder Social logo

alessandrosaviolo / evolving-cnns-using-ga Goto Github PK

View Code? Open in Web Editor NEW
22.0 1.0 11.0 924 KB

Evolving Architectures for Convolutional Neural Networks using the Genetic Algorithm

License: GNU General Public License v3.0

Python 100.00%
cnn ga convolutional-neural-networks genetic-algorithm optimization cnn-optimization evolutionary-deep-learning cifar-10

evolving-cnns-using-ga's People

Contributors

alessandrosaviolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

evolving-cnns-using-ga's Issues

question

Evolving-CNNs-using-GA/src/utilities.py", line 32, in save_network
pickle.dump(network, object_file)
TypeError: can't pickle weakref objects
Excuse me, how to solve this problem ?

A pickle problem while running: TypeError: can't pickle _thread.RLock objects

Model: "sequential"


Layer (type) Output Shape Param #

conv2d (Conv2D) (None, 32, 32, 32) 896


conv2d_1 (Conv2D) (None, 30, 30, 32) 9248


max_pooling2d (MaxPooling2D) (None, 15, 15, 32) 0


flatten (Flatten) (None, 7200) 0


dense (Dense) (None, 128) 921728


dense_1 (Dense) (None, 10) 1290

Total params: 933,162
Trainable params: 933,162
Non-trainable params: 0


None
FITNESS: 1.118133783340454
Traceback (most recent call last):
File "main.py", line 216, in
main()
File "main.py", line 181, in main
optCNN = genetic_algorithm(num_population, num_generation, num_offspring, dataset)
File "main.py", line 76, in genetic_algorithm
population = initialize_population(num_population, dataset)
File "main.py", line 15, in initialize_population
daddy = compute_parent(dataset) # load parent from input
File "/home/guohy/ECNN/Evolving-CNNs-using-GA/src/inout.py", line 62, in compute_parent
daddy.train_and_evaluate(model, dataset)
File "/home/guohy/ECNN/Evolving-CNNs-using-GA/src/network.py", line 52, in train_and_evaluate
save_network(self) # save topology, model and fitness
File "/home/guohy/ECNN/Evolving-CNNs-using-GA/src/utilities.py", line 31, in save_network
pickle.dump(network, object_file)
TypeError: can't pickle _thread.RLock objects

Could you tell me how to solve the problem?Thank you very much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.