conv-neural-network

How to initialize CNN Layer with Gammatone Filters (or any filter) for sound regression (Or Classification)?

戏子无情 提交于 2020-07-23 08:40:27
问题 For my project I need to initialize the CNN 1st Layer kernel with Gammatone filters according to papers ( https://www.mdpi.com/1099-4300/20/12/990/htm ) ,( https://www.groundai.com/project/end-to-end-environmental-sound-classification-using-a-1d-convolutional-neural-network/1 ) and a few others. What does it exactly mean to initialize the cnn kernel with Gammatone filter (Or any filter). How does one implement it? Is it a custom layer? Any tips and guidance would be much appreciated! for

How to initialize CNN Layer with Gammatone Filters (or any filter) for sound regression (Or Classification)?

萝らか妹 提交于 2020-07-23 08:38:06
问题 For my project I need to initialize the CNN 1st Layer kernel with Gammatone filters according to papers ( https://www.mdpi.com/1099-4300/20/12/990/htm ) ,( https://www.groundai.com/project/end-to-end-environmental-sound-classification-using-a-1d-convolutional-neural-network/1 ) and a few others. What does it exactly mean to initialize the cnn kernel with Gammatone filter (Or any filter). How does one implement it? Is it a custom layer? Any tips and guidance would be much appreciated! for

How to initialize CNN Layer with Gammatone Filters (or any filter) for sound regression (Or Classification)?

自闭症网瘾萝莉.ら 提交于 2020-07-23 08:37:53
问题 For my project I need to initialize the CNN 1st Layer kernel with Gammatone filters according to papers ( https://www.mdpi.com/1099-4300/20/12/990/htm ) ,( https://www.groundai.com/project/end-to-end-environmental-sound-classification-using-a-1d-convolutional-neural-network/1 ) and a few others. What does it exactly mean to initialize the cnn kernel with Gammatone filter (Or any filter). How does one implement it? Is it a custom layer? Any tips and guidance would be much appreciated! for

Modify some values in the weight file (.h5) of VGG-16

让人想犯罪 __ 提交于 2020-07-23 06:17:04
问题 I have the weight and bias values for each layer of the VGG model saved as a .h5 file. I got the file from: https://github.com/fchollet/deep-learning-models/releases/tag/v0.1 Now let's say I want to change a few values in that file. With help from How to overwrite array inside h5 file using h5py, I am trying to do the same as follows: import h5py file_name = "vgg.h5" f = h5py.File(file_name, 'r+') # List all groups print("Keys: %s" % f.keys()) # Get the data data = (f['block2_conv1']['block2

Modify some values in the weight file (.h5) of VGG-16

空扰寡人 提交于 2020-07-23 06:15:10
问题 I have the weight and bias values for each layer of the VGG model saved as a .h5 file. I got the file from: https://github.com/fchollet/deep-learning-models/releases/tag/v0.1 Now let's say I want to change a few values in that file. With help from How to overwrite array inside h5 file using h5py, I am trying to do the same as follows: import h5py file_name = "vgg.h5" f = h5py.File(file_name, 'r+') # List all groups print("Keys: %s" % f.keys()) # Get the data data = (f['block2_conv1']['block2

Modify some values in the weight file (.h5) of VGG-16

↘锁芯ラ 提交于 2020-07-23 06:14:11
问题 I have the weight and bias values for each layer of the VGG model saved as a .h5 file. I got the file from: https://github.com/fchollet/deep-learning-models/releases/tag/v0.1 Now let's say I want to change a few values in that file. With help from How to overwrite array inside h5 file using h5py, I am trying to do the same as follows: import h5py file_name = "vgg.h5" f = h5py.File(file_name, 'r+') # List all groups print("Keys: %s" % f.keys()) # Get the data data = (f['block2_conv1']['block2

weight visualization of 3d convolutional kernel

偶尔善良 提交于 2020-07-22 16:59:51
问题 I am using 3d kernel of size 3x3x3 for the convoution layer and would like to plot the weights of the layer. Since plotting in 3d is not possible i tried to split the kernels into 3 3×3 for plotting. Is this approach correct? The conv layer consists of 5 layers #model.add(layers.Conv3D(5, (3, 3, 3), padding=’same’)) Please find below the code I used to plot the weights from keras.models import load_model mymodel = load_model(‘model.hdf5′) from matplotlib import pyplot as plt # load the model

Convolutional Neural Net Architecture - correct?

南笙酒味 提交于 2020-07-20 06:32:19
问题 I am trying to train a convolutional neural net. Therefore I am using a datset of 646 images/license plates which contains 8 characters (0-9, A-Z; without letter 'O' and blank spaces, in total 36 possible characters). These are my training data X_train . Their shape is (646, 40, 200, 3) with color code 3. I resized them to the same shape. I also have a dataset which contains the labels of this images, which I one-hot-encoded to a numpy array of shape (646, 8, 36) . This data is my y_train

How To Determine the 'filter' Parameter in the Keras Conv2D Function

岁酱吖の 提交于 2020-07-16 15:40:11
问题 I'm just beginning my ML journey and have done a few tutorials. One thing that's not clear (to me) is how the 'filter' parameter is determined for Keras Conv2D. Most sources I've read simply set the parameter to 32 without explanation. Is this just a rule of thumb or do the dimensions of the input images play a part? For example, the images in CIFAR-10 are 32x32 Specifically: model = Sequential() filters = 32 model.add(Conv2D(filters, (3, 3), padding='same', input_shape=x_train.shape[1:]))

pytorch conv2d value cannot be converted to type uint8_t without overflow

廉价感情. 提交于 2020-07-09 16:15:41
问题 I'm passing a torch.Tensor with a dtype of torch.uint8 to an nn.Conv2d module and it is giving the error RuntimeError: value cannot be converted to type uint8_t without overflow: -0.0344873 My conv2d is defined as self.conv1 = nn.Conv2d(3, 6, 5) . The error comes in my forward method when I pass the tensor to the module like self.conv1(x) . The tensor has shape (4, 3, 480, 640). I'm not sure how to fix this. Here is the stack trace Traceback (most recent call last): File "cnn.py", line 54, in