keunwoochoi / auralisation Goto Github PK
View Code? Open in Web Editor NEWAuralisation of learned features in CNN (for audio)
Auralisation of learned features in CNN (for audio)
Hi keunwoochoi, thank for this tool it works great on your network! :)
I wonder how I can get this tool to work with a network that I will define and train myself :
get_unpooling2d(images, switches, ds=2)
takes the argument switches, I guess it's from a custom MaxPooling2D function, am I right? If not, which function did you use in your CNN and where can I find it?
Is the code generic and can easily generalize to other CNN architecture? Some functions look quite specific ( load_weights()
for example, but could be easy to change)
What is the structure of the file .keras
? Is it enough if I save a model in the HDF5 format?
Thank you in advance :)
PS : If you could give a concrete example on how to use it with another model it would be so great but I would understand if you don't want to reveal your custom function.
Hello @keunwoochoi @mpariente
While loading weights from .keras file giving me this error. Can anyone help me with this?
Traceback (most recent call last):
File "example.py", line 33, in
W, layer_names = auralise.load_weights()
File "D:\MP_ASR\Auralisation-master\auralise.py", line 175, in load_weights
print(f[key]['param_0'][:,:,:,:])
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "C:\Users\Jeet\Anaconda3\lib\site-packages\h5py_hl\group.py", line 264, in getitem
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'param_0' doesn't exist)"
Thanks in advance.
import h5py
model_name = "vggnet5"
keras_filename = "vggnet5_local_keras_model_CNN_stft_11_frame_173_freq_257_folding_0_best.keras"
f = h5py.File(keras_filename)
In auralise.py
, I only use param_0
, which is weights. Bias values are in param_1
>>> f['layer_3']['param_0']
<HDF5 dataset "param_0": shape (64, 64, 3, 3), type "<f4">
>>> f['layer_3']['param_1']
<HDF5 dataset "param_1": shape (64,), type "<f4">
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.