conv-neural-network

Convolutional layer in Python using Numpy

霸气de小男生 提交于 2021-01-01 13:31:32
问题 I am trying to implement a convolutional layer in Python using Numpy. The input is a 4-dimensional array of shape [N, H, W, C] , where: N : Batch size H : Height of image W : Width of image C : Number of channels The convolutional filter is also a 4-dimensional array of shape [F, F, Cin, Cout] , where F : Height and width of a square filter Cin : Number of input channels ( Cin = C ) Cout : Number of output channels Assuming a stride of one along all axes, and no padding, the output should be

Convolutional layer in Python using Numpy

北城以北 提交于 2021-01-01 13:31:09
问题 I am trying to implement a convolutional layer in Python using Numpy. The input is a 4-dimensional array of shape [N, H, W, C] , where: N : Batch size H : Height of image W : Width of image C : Number of channels The convolutional filter is also a 4-dimensional array of shape [F, F, Cin, Cout] , where F : Height and width of a square filter Cin : Number of input channels ( Cin = C ) Cout : Number of output channels Assuming a stride of one along all axes, and no padding, the output should be

ValueError: Target size (torch.Size([16])) must be the same as input size (torch.Size([16, 1]))

流过昼夜 提交于 2020-12-30 06:32:26
问题 ValueError Traceback (most recent call last) <ipython-input-30-33821ccddf5f> in <module> 23 output = model(data) 24 # calculate the batch loss ---> 25 loss = criterion(output, target) 26 # backward pass: compute gradient of the loss with respect to model parameters 27 loss.backward() C:\Users\mnauf\Anaconda3\envs\federated_learning\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs) 487 result = self._slow_forward(*input, **kwargs) 488 else: --> 489 result = self

Multi-Label Image Classification

假装没事ソ 提交于 2020-12-15 02:03:24
问题 I tried myself but couldn't reach the final point that's why posting here, please guide me. I am working in multi-label image classification and have slightly different scenarios. Actually I am confused, how we will map labels and their attribute with Id etc So we can use for training and testing. Here is code on which I am working import os import numpy as np import pandas as pd from keras.utils import to_categorical from collections import Counter from keras.callbacks import Callback from

Multi-Label Image Classification

夙愿已清 提交于 2020-12-15 02:01:38
问题 I tried myself but couldn't reach the final point that's why posting here, please guide me. I am working in multi-label image classification and have slightly different scenarios. Actually I am confused, how we will map labels and their attribute with Id etc So we can use for training and testing. Here is code on which I am working import os import numpy as np import pandas as pd from keras.utils import to_categorical from collections import Counter from keras.callbacks import Callback from

Multi-Label Image Classification

陌路散爱 提交于 2020-12-15 02:01:12
问题 I tried myself but couldn't reach the final point that's why posting here, please guide me. I am working in multi-label image classification and have slightly different scenarios. Actually I am confused, how we will map labels and their attribute with Id etc So we can use for training and testing. Here is code on which I am working import os import numpy as np import pandas as pd from keras.utils import to_categorical from collections import Counter from keras.callbacks import Callback from

Poor Result with BatchNormalization

↘锁芯ラ 提交于 2020-12-13 03:43:49
问题 I have been trying to implement the DCGan, the face book's paper, and blocked by below two issues almost for 2 weeks. Any suggestions would be appreciated. Thanks. Issue 1: DCGAN paper suggest to use BN(Batch Normalization) both the generator and discriminator. But, I couldn't get better result with BN rather than w/out BN. I copied DCGAN model I used which is exactly the same with a DCGAN paper. I don't think it is due to overfitting. Because (1) It keeps showing the noise the same with an

Poor Result with BatchNormalization

本秂侑毒 提交于 2020-12-13 03:43:44
问题 I have been trying to implement the DCGan, the face book's paper, and blocked by below two issues almost for 2 weeks. Any suggestions would be appreciated. Thanks. Issue 1: DCGAN paper suggest to use BN(Batch Normalization) both the generator and discriminator. But, I couldn't get better result with BN rather than w/out BN. I copied DCGAN model I used which is exactly the same with a DCGAN paper. I don't think it is due to overfitting. Because (1) It keeps showing the noise the same with an

Unknown number of steps - Training convolution neural network at Google Colab Pro

偶尔善良 提交于 2020-12-12 17:47:34
问题 I am trying to run (training) my CNN at Google Colab Pro , when I run my code, all is allright, but It does not know the number of steps, so an infinite loop is created. Mounted at /content/drive 2.2.0-rc3 Found 10018 images belonging to 2 classes. Found 1336 images belonging to 2 classes. WARNING:tensorflow:`period` argument is deprecated. Please use `save_freq` to specify the frequency in number of batches seen. Epoch 1/300 8/Unknown - 364s 45s/step - loss: 54.9278 - accuracy: 0.5410 I am

How to convert 2D bounding box pixel coordinates (x, y, w, h) into relative coordinates (Yolo format)?

心已入冬 提交于 2020-12-12 05:54:38
问题 Hy! I am annotating image data through an online plateform which is generating output coordinates like this: bbox":{"top":634,"left":523,"height":103,"width":145} However, i want to use this annotation to train Yolo. So, I have to convert it in yolo format like this: 4 0.838021 0.605556 0.177083 0.237037 In this regard, i need help about how to convert it. 回答1: Here, For the size you need to pass the (w,h) and the for the box you need to pass (x,x+w, y, y+h) https://github.com/ivder