ehw-fit / nascaps Goto Github PK
View Code? Open in Web Editor NEWA Framework for Neural Architecture Search to Optimize the Accuracy and Hardware Efficiency of Convolutional Capsule Networks
License: MIT License
A Framework for Neural Architecture Search to Optimize the Accuracy and Hardware Efficiency of Convolutional Capsule Networks
License: MIT License
Hi,
How can I run this on a windows system. I have installed conda and tried to set the environment but it failed. Any tips please? It looks like a really nice software by the way.
Best regards,
MA
I have been going over the implementation of the NASCaps repo, and to understand how the algorithm searches the architecture I am following the README.md there to run the "main.py" with its args as mentioned in the file. and I have encountered an issue explained down below:
Once a gene is created and the corresponding CapsNet model is created, upon training the model for evaluating the population (method evaluate_population > wrap_train_test > train) I get the following error:
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/tensorflow/python/framework/errors_impl.py", line 528, in __exit__
c_api.TF_GetCode(self.status.status))
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1439, in __call__
run_metadata_ptr)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 2675, in _call
fetched = self._callable_fn(*array_vals)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 2715, in __call__
return self._call(inputs)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/keras/engine/training.py", line 1217, in train_on_batch
outputs = self.train_function(ins)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/keras/engine/training_generator.py", line 217, in fit_generator
class_weight=class_weight)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/keras/engine/training.py", line 1418, in fit_generator
initial_epoch=initial_epoch)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/ak11263/nascaps/nsga/main.py", line 893, in train
callbacks=[timeout_call, log, checkpoint, lr_decay])
File "/home/ak11263/nascaps/nsga/main.py", line 652, in wrap_train_test
runid, _ = train(model=model, data=((x_train_current, y_train), (x_test_current, y_test)), args=args)
File "/home/ak11263/nascaps/nsga/main.py", line 525, in evaluate_population
p["runid"], train_acc = wrap_train_test(p["gene"])
File "/home/ak11263/nascaps/nsga/main.py", line 711, in run_NSGA2
evaluate_population(parent)
File "/home/ak11263/nascaps/nsga/main.py", line 1065, in <module>
rets = run_NSGA2(metrics=["accuracy_drop", "energy", "memory", "latency"], inshape=inshape, p_size=args.population, q_size=args.offsprings, generations=args.generations)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ak11263/miniconda3/envs/tf-1.13-gpu/lib/python3.7/runpy.py", line 193, in _run_module_as_main (Current frame)
"__main__", mod_spec)
tensorflow.python.framework.errors_impl.InternalError: Blas GEMM launch failed : a.shape=(100, 160), b.shape=(160, 784), m=100, n=784, k=160
[[{{node decoder/dense_1/MatMul}}]]
[[{{node loss/decoder_loss/Mean_3}}]]
After disabling (commenting out) the training and testing of the generated model and replacing it with a dummy model to generate a random test_acc I have seen that the program runs successfully.
I have been looking around the net and have some suggestions that the use of tensorflow v1 is causing the issue (I also have seen that it has been showing me plenty of warnings of deprecations).
I also have started migrating the project into tensorflow 2, although not very successfully.
It would have been delightful if I could have been given any suggestions.
Hi,
I have run this code many times. A problem that I have is that sometimes when I try to load a trained network with weights, the weights don't map on to the network. Here is an example of the error that I get.
ValueError: You are trying to load a weight file containing 1 layers into a model with 4 layers.
I wonder if there is a cure for this?
Best regards,
Could you please provide some info on how to feed this framework a new generic Hardware accelerator? (have read your paper, great job by the way)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.