neural-network

What is the definition of “feature” in neural network?

大憨熊 提交于 2019-12-21 03:33:18
问题 I am a beginner of the neural network. I am very confused about the word feature . Can you give me a defintion of feature ? Are the features the neurons in the hidden layers? 回答1: The features are the elements of your input vectors. The number of features is equal to the number of nodes in the input layer of the network. If you were using a neural network to classify people as either men or women, the features would be things like height, weight, hair length etc. Each of these would have an

Training only one output of a network in Keras

扶醉桌前 提交于 2019-12-21 02:30:17
问题 I have a network in Keras with many outputs, however, my training data only provides information for a single output at a time. At the moment my method for training has been to run a prediction on the input in question, change the value of the particular output that I am training and then doing a single batch update. If I'm right this is the same as setting the loss for all outputs to zero except the one that I'm trying to train. Is there a better way? I've tried class weights where I set a

Neural network backpropagation algorithm not working in Python

孤者浪人 提交于 2019-12-21 01:18:37
问题 I am writing a neural network in Python, following the example here. It seems that the backpropagation algorithm isn't working, given that the neural network fails to produce the right value (within a margin of error) after being trained 10 thousand times. Specifically, I am training it to compute the sine function in the following example: import numpy as np class Neuralnet: def __init__(self, neurons): self.weights = [] self.inputs = [] self.outputs = [] self.errors = [] self.rate = .1 for

How can I implement a recursive neural network in TensorFlow?

落花浮王杯 提交于 2019-12-21 01:11:53
问题 Is there some way of implementing a recursive neural network like the one in [Socher et al. 2011] using TensorFlow? Note that this is different from recurrent neural networks, which are nicely supported by TensorFlow. The difference is that the network is not replicated into a linear sequence of operations, but into a tree structure. I imagine that I could use the While op to construct something like a breadth-first traversal of the tree data structure for each entry of my dataset. Maybe it

Why should we normalize data for deep learning in Keras?

北慕城南 提交于 2019-12-21 01:05:31
问题 I was testing some network architectures in Keras for classifying the MNIST dataset. I have implemented one that is similar to the LeNet. I have seem that in the examples that I have found in the internet, there is a step of data normalization. For example: X_train /= 255 I have performed a test without this normalization and I have seem that the performance (accuracy) of the network has decreased (keeping the same number of epochs). Why have this happened? If I increase the number of epochs,

Limit neural network output to subset of trained classes

六眼飞鱼酱① 提交于 2019-12-21 00:32:02
问题 Is it possible to pass a vector to a trained neural network so it only chooses from a subset of the classes it was trained to recognize. For example, I have a network trained to recognize numbers and letters, but I know that the images I'm running it on next will not contain lowercase letters (Such as images of serial numbers). Then I pass it a vector telling it not to guess any lowercase letters. Since the classes are exclusive the network ends in a softmax function. Following are just

TensorFlow TypeError: Value passed to parameter input has DataType uint8 not in list of allowed values: float16, float32

会有一股神秘感。 提交于 2019-12-20 18:28:03
问题 I am trying to get a simple CNN to train for the past 3 days. First, I have setup an input pipeline/queue configuration that reads images from a directory tree and prepares batches. I got the code for this at this link. So, I now have train_image_batch and train_label_batch that I need to feed to my CNN. train_image_batch, train_label_batch = tf.train.batch( [train_image, train_label], batch_size=BATCH_SIZE # ,num_threads=1 ) And I am unable to figure out how. I am using the code for CNN

Neural Network size for Animation system

旧城冷巷雨未停 提交于 2019-12-20 12:39:09
问题 I decided to go with a Neural Network in order to create behaviors for an animation engine that I have. The neural network takes in 3 vector3s and 1 Euler angle for every body part that I have. The first vector3 is the position, the second is its velocity, and the third is its angular velocity. The Euler angle is what rotation the body part is at. and I have 7 body parts. Each one of those data types has 3 floats. 7*4*3 = 84, so I have 84 inputs for my neural network. The outputs are mapped

How to create a Image Dataset just like MNIST dataset?

空扰寡人 提交于 2019-12-20 12:21:12
问题 I have 10000 BMP images of some handwritten digits. If i want to feed the datas to a neural network what do i need to do ? For MNIST dataset i just had to write (X_train, y_train), (X_test, y_test) = mnist.load_data() I am using Keras library in python . How can i create such dataset ? 回答1: You can either write a function that loads all your images and stack them into a numpy array if all fits in RAM or use Keras ImageDataGenerator (https://keras.io/preprocessing/image/) which includes a

How to implement the Softmax derivative independently from any loss function?

最后都变了- 提交于 2019-12-20 12:19:14
问题 For a neural networks library I implemented some activation functions and loss functions and their derivatives. They can be combined arbitrarily and the derivative at the output layers just becomes the product of the loss derivative and the activation derivative. However, I failed to implement the derivative of the Softmax activation function independently from any loss function. Due to the normalization i.e. the denominator in the equation, changing a single input activation changes all