neural-network

Reshaping Keras layers

折月煮酒 提交于 2020-05-10 04:24:05
问题 I have an input image 416x416. How can I create an output of 4 x 10, where 4 is number of columns and 10 the number of rows? My label data is 2D array with 4 columns and 10 rows. I know about the reshape() method but it requires that the resulted shape has same number of elements as the input. With 416 x 416 input size and max pools layers I can get max 13 x 13 output. Is there a way to achieve 4x10 output without loss of data? My input label data looks like for example like [[ 0 0 0 0] [ 0 0

Train Validation data split - labels available but no classes

*爱你&永不变心* 提交于 2020-05-09 06:59:25
问题 my studies project is to develop a neural network to recognize text on license plates. Therefore, I found the ReId-dataset at https://medusa.fit.vutbr.cz/traffic/research-topics/general-traffic-analysis/holistic-recognition-of-low-quality-license-plates-by-cnn-using-track-annotated-data-iwt4s-avss-2017/. This dataset contains a bunch of images of number plates as well as the text of the license plates and was used by Spanhel et al. for a similar approach as the one I have in mind. Example of

Train Validation data split - labels available but no classes

吃可爱长大的小学妹 提交于 2020-05-09 06:59:05
问题 my studies project is to develop a neural network to recognize text on license plates. Therefore, I found the ReId-dataset at https://medusa.fit.vutbr.cz/traffic/research-topics/general-traffic-analysis/holistic-recognition-of-low-quality-license-plates-by-cnn-using-track-annotated-data-iwt4s-avss-2017/. This dataset contains a bunch of images of number plates as well as the text of the license plates and was used by Spanhel et al. for a similar approach as the one I have in mind. Example of

How to interpret and transform the values predicted by Keras classifier?

試著忘記壹切 提交于 2020-05-08 18:56:41
问题 I'm training my Keras model to predict whether, with the provided data parameter, it will make a shot or not and it will represent in such a way that 0 means no and 1 means yes. However, when I try to predict it I got values that are float. I've tried using the data that is exactly the same as train data to get 1 but it does not work. I used the data below to tried the one-hot encoding. https://github.com/eijaz1/Deep-Learning-in-Keras-Tutorial/blob/master/keras_tutorial.ipynb import pandas as

What are C classes for a NLLLoss loss function in Pytorch?

孤街醉人 提交于 2020-05-08 09:40:29
问题 I'm asking about C classes for a NLLLoss loss function. The documentation states: The negative log likelihood loss. It is useful to train a classification problem with C classes. Basically everything after that point depends upon you knowing what a C class is, and I thought I knew what a C class was but the documentation doesn't make much sense to me. Especially when it describes the expected inputs of (N, C) where C = number of classes . That's where I'm confused, because I thought a C class

What does the standard Keras model output mean? What is epoch and loss in Keras?

て烟熏妆下的殇ゞ 提交于 2020-05-07 10:14:12
问题 I have just built my first model using Keras and this is the output. It looks like the standard output you get after building any Keras artificial neural network. Even after looking in the documentation, I do not fully understand what the epoch is and what the loss is which is printed in the output. What is epoch and loss in Keras? (I know it's probably an extremely basic question, but I couldn't seem to locate the answer online, and if the answer is really that hard to glean from the

Neural network (perceptron) - visualizing decision boundary (as a hyperplane) when performing binary classification

我是研究僧i 提交于 2020-05-07 08:35:15
问题 I would like to visualize the decision boundary for a simple neural network with only one neuron (3 inputs, binary output). I'm extracting the weights from a Keras NN model and then attempting to draw the surface plane using matplotlib. Unfortunately, the hyperplane is not appearing between the points on the scatter plot, but instead is displaying underneath all the data points (see output image). I am calculating the z-axis of the hyperplane using the equation z = (d - ax - by) / c for a

Neural network (perceptron) - visualizing decision boundary (as a hyperplane) when performing binary classification

╄→гoц情女王★ 提交于 2020-05-07 08:33:51
问题 I would like to visualize the decision boundary for a simple neural network with only one neuron (3 inputs, binary output). I'm extracting the weights from a Keras NN model and then attempting to draw the surface plane using matplotlib. Unfortunately, the hyperplane is not appearing between the points on the scatter plot, but instead is displaying underneath all the data points (see output image). I am calculating the z-axis of the hyperplane using the equation z = (d - ax - by) / c for a

Neural network (perceptron) - visualizing decision boundary (as a hyperplane) when performing binary classification

天涯浪子 提交于 2020-05-07 08:33:16
问题 I would like to visualize the decision boundary for a simple neural network with only one neuron (3 inputs, binary output). I'm extracting the weights from a Keras NN model and then attempting to draw the surface plane using matplotlib. Unfortunately, the hyperplane is not appearing between the points on the scatter plot, but instead is displaying underneath all the data points (see output image). I am calculating the z-axis of the hyperplane using the equation z = (d - ax - by) / c for a

Simple neural network gives wrong output after training

前提是你 提交于 2020-04-18 06:10:17
问题 I've been working on a simple neural network. It takes in a data set with 3 columns, if the first column's value is a 1, then the output should be a 1. I've provided comments so it is easier to follow. Code is as follows: import numpy as np import random def sigmoid_derivative(x): return x * (1 - x) def sigmoid(x): return 1 / (1 + np.exp(-x)) def think(weights, inputs): sum = (weights[0] * inputs[0]) + (weights[1] * inputs[1]) + (weights[2] * inputs[2]) return sigmoid(sum) if __name__ == "_