evolving-ai-lab / synthesizing Goto Github PK
View Code? Open in Web Editor NEWCode for paper "Synthesizing the preferred inputs for neurons in neural networks via deep generator networks"
License: MIT License
Code for paper "Synthesizing the preferred inputs for neurons in neural networks via deep generator networks"
License: MIT License
I want to visualize my own models, but I don't know how to train the generator.caffemodel.
Can you help me? Thank you~
The provided links for downloading the Upconvolutional network is unavailable: http://lmb.informatik.uni-freiburg.de/resources/software.php appears to be down, meaning its not currently possible to fully install this repository.
I don't know if this unavailability is permanent - and have emailed the original papers' authors - but do you know of any other sources for this?
Thanks for posting the code; it looks really interesting! When I run any of the examples I get this sort of error:
Starting optimizing WARNING: Logging before InitGoogleLogging() is written to STDERR F1227 00:45:44.057626 2037047296 inner_product_layer.cpp:144] Cannot use GPU in CPU-only Caffe: check mode. *** Check failure stack trace: *** ./1_activate_output.sh: line 57: 14235 Abort trap: 6 python ./act_max.py --act_layer ${act_layer} --opt_layer ${opt_layer} --unit ${unit} --xy ${xy} --n_iters ${n_iters} --start_lr ${lr} --end_lr ${end_lr} --L2 ${L2} --seed ${seed} --clip ${clip} --bound ${bound_file} --debug ${debug} --output_dir ${output_dir} --init_file ${init_file} convert: unable to open image
output/fc8_0643_200_0.99_8.0__0.jpg': No such file or directory @ error/blob.c/OpenBlob/2701.output/fc8_0643_200_0.99_8.0__0.jpg' @ error/convert.c/ConvertImageCommand/3258. convert: unable to open image
output/fc8_0643_200_0.99_8.0__0.jpg': No such file or directory @ error/blob.c/OpenBlob/2701.`
Any idea what could be causing it?
Thanks so much!
Hello ! I totally love this code, thank you so much for putting this together. But I just have a question, how to up the output size ? I just bought a very fast computer and I would like to have High rez results !
That would be amazing, thanks in advance !
This code looks cool. but is there an online demo so i can experiment it first
How to increase the resolution of the output images?
Looking at the code inside of act_max.py it appears to me that the way the neurons get activated in convolutional layers is a bit of a shortcut and will miss most of them. It looks like only the diagonal ones are accessed since xy is the same for x and y:
# Move in the direction of increasing activation of the given neuron
if end in fc_layers:
one_hot.flat[unit] = 1.
elif end in conv_layers:
one_hot[:, unit, xy, xy] = 1.
else:
raise Exception("Invalid layer type!")
I made a quick fix which seems to work, which treats the xy as an index and converts it to a column/row representation - I'm not sure if this makes sense, but it does return results that look reasonable:
# Move in the direction of increasing activation of the given neuron
if end in fc_layers:
one_hot.flat[unit] = 1.
elif end in conv_layers:
one_hot[:, unit, xy % one_hot.shape[2], int(xy/one_hot.shape[2])] = 1.
else:
raise Exception("Invalid layer type!")
further down in that function another fix is required:
# Check the activations
if end in fc_layers:
fc = acts[end][0]
best_unit = fc.argmax()
obj_act = fc[unit]
elif end in conv_layers:
fc = acts[end][0, :, xy % acts[end].shape[2] , int(xy/acts[end].shape[2])]
best_unit = fc.argmax()
obj_act = fc[unit]
Hello,
I am trying to run the code but I can't download the weights. The link seems to be deactivatex.
cd nets/upconv && ./download.sh or the direct link doesn't respond.
Can you help with this problem?
Thank you in advance.
This is not an issue, but a feature request. Is there code available for visualizing 2 (or more) neurons at the same time?
I'd like to explore the section of your paper about using 2, or more, neurons to generate a single image, for example volcano (n09472597 volcano) + Candle (n02948072 candle, taper, wax light).
Very cool project.
Hello,thanks a lot for sharing the code. I try to run the program following you description. A question to ask you: "1_activate_output.sh","2_activate_output_placesCNN.sh","4_activate_hidden.sh","5_activate_output_GoogLeNet.sh",they needn't to input image,right? My understanding is you train the model only classify the type(eg:mask,library,and so on) and collect features of these image, then input a type and the model will generate that type image,right?
Hello,
I'm trying to adapt your code for a different network (a regression), and I have trouble training the generator network. I'm using http://arxiv.org/abs/1602.02644 as a reference, but I have trouble finding a good combination of generator architecture, discriminant architecture, and hyper parameters.
Would you be open to shared some details of how you trained the generator?
Thanks,
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.