Music Genre Classification using Convolutional Recurrent Neural Networks
- Download GENRE data from Marsyas
- Extract the tarball in the directory which contains the cloned repo.
python cnn.py
python crnn.py
Tensorflow Implementation of Convolutional Recurrent Neural Networks for Music Genre Classification
Music Genre Classification using Convolutional Recurrent Neural Networks
python cnn.py
python crnn.py
ask for help
why set to n_samples=1000 , my result auc gradually decrease,
and the loss is printed every batch_size, I find the loss not decreasing
my python version is 3.6, tensorflow version is 1.4.
and the code can run correctly,
labels = pd.read_csv(labels_file,header=0)
showing the error while reading the file.
Please help to rectify it.
Hi
I have runtime error for execution crnn.py
My env :
OS : Windows 7
Python 3.5.3 Anaconda
Any solution to fix it ?
crnn.py line 67
gru1_out, state = tf.nn.dynamic_rnn (gru1, gru1_in, dtype=tf.float32, scope='gru1')
ValueError: Trying to share variable gru1/multi_rnn_cell/cell_0/gru_cell/gates/kernel,
but specified shape (64, 64) and found shape (160, 64).
on running crnn.py iam getting this error
I:\Coding\crnn-music-genre-classification-master\src>python crnn.py
C:\Users\dsemw\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "crnn.py", line 94, in
X_test = rd.get_melspectrograms_indexed(test_indices)
File "I:\Coding\crnn-music-genre-classification-master\src\read_data.py", line 25, in get_melspectrograms_indexed
spectrograms = np.asarray([dp.log_scale_melspectrogram(i) for i in labels_dense['path'][index]])
File "I:\Coding\crnn-music-genre-classification-master\src\read_data.py", line 25, in
spectrograms = np.asarray([dp.log_scale_melspectrogram(i) for i in labels_dense['path'][index]])
File "I:\Coding\crnn-music-genre-classification-master\src\data_preprocess.py", line 21, in log_scale_melspectrogram
signal = signal[(n_sample-n_sample_fit)/2:(n_sample+n_sample_fit)/2]
TypeError: slice indices must be integers or None or have an index method
Hi
Thanks for your code.
I executed this code for cnn.py
All epoch print "AUC : 1.0" from start step to end step.
And,
for argmax mean, all epoch print "0.0"
Is this a good execution result ?
My Env is below :
Python 3.5.3
Anaconda 64 bit
Windows 7 64bit
how to make mp3 files into txt files?
W tensorflow/core/common_runtime/bfc_allocator.cc:275] Ran out of memory trying to allocate 6.59GiB. See logs for memory state.
W tensorflow/core/framework/op_kernel.cc:993] Resource exhausted: OOM when allocating tensor with shape[200,64,96,1440]
Traceback (most recent call last):
File "crnn.py", line 144, in
predictions = sess.run(predict_op, feed_dict=test_input_dict)
File "/home/ubuntu/anaconda3/envs/tf_1.0.1_py_2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 767, in run
run_metadata_ptr)
File "/home/ubuntu/anaconda3/envs/tf_1.0.1_py_2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 965, in _run
feed_dict_string, options, run_metadata)
File "/home/ubuntu/anaconda3/envs/tf_1.0.1_py_2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1015, in _do_run
target_list, options, run_metadata)
File "/home/ubuntu/anaconda3/envs/tf_1.0.1_py_2.7/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1035, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[200,64,96,1440]
[[Node: Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](Reshape_1, Variable/read)]]
[[Node: Sigmoid/_87 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_249_Sigmoid", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"]]
I can't train with the whole dataset, even 500 samples.
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.