neural-network

How to find the number of hidden layers and neurons in each hidden layer for regression?

£可爱£侵袭症+ 提交于 2020-02-07 03:09:11
问题 I have read posts and articles that talk about finding the right number of hidden layer and number of neurons in each hidden layer for a classification problem. However, I couldn't find any relevant information for regression? Can someone help explain the calculation of right number of hidden layer and neurons in them? 回答1: The is no calculation for the "right" number of hidden layers and neurons in them. Trying to find the best model by tuning the number of hidden layers and neurons in them

Import Python Keras model with weights into Tensorflow.js

≡放荡痞女 提交于 2020-02-06 18:53:55
问题 I have some neural networks for the classification of images developed in Python 3.7 using the Keras package that is included in TensorFlow and I want to export the layers and weights model to import it in a Node.js application that uses Tensorflow.js. I have the neural networks saved in h5 format with two separate files, one for the layer model and the other for the weights model. Try to follow this tutorial that Tensorflow proposes (https://www.tensorflow.org/js/tutorials/conversion/import

Import Python Keras model with weights into Tensorflow.js

十年热恋 提交于 2020-02-06 18:52:34
问题 I have some neural networks for the classification of images developed in Python 3.7 using the Keras package that is included in TensorFlow and I want to export the layers and weights model to import it in a Node.js application that uses Tensorflow.js. I have the neural networks saved in h5 format with two separate files, one for the layer model and the other for the weights model. Try to follow this tutorial that Tensorflow proposes (https://www.tensorflow.org/js/tutorials/conversion/import

Import Python Keras model with weights into Tensorflow.js

只谈情不闲聊 提交于 2020-02-06 18:50:19
问题 I have some neural networks for the classification of images developed in Python 3.7 using the Keras package that is included in TensorFlow and I want to export the layers and weights model to import it in a Node.js application that uses Tensorflow.js. I have the neural networks saved in h5 format with two separate files, one for the layer model and the other for the weights model. Try to follow this tutorial that Tensorflow proposes (https://www.tensorflow.org/js/tutorials/conversion/import

Implementing an CLSTM but facing Dimension Error Problem

戏子无情 提交于 2020-02-06 07:24:06
问题 i am implementing a CLSTM based on This problem but facing error of dimensionality. Data set: I am currently working on one video, which has 4500 images of size (28,28) . The data set is in vectorized form so i get (4500,780) . I split the images using Timeseriessplit and reshape the images with x_train=x_train.reshape(-1, 28, 28, 1) x_test=x_test.reshape(-1, 28, 28, 1) My model is as follows model = models.Sequential() model.add(layers.ConvLSTM2D( filters=40, kernel_size=(3, 3), input_shape=

Implementing an CLSTM but facing Dimension Error Problem

不羁岁月 提交于 2020-02-06 07:24:05
问题 i am implementing a CLSTM based on This problem but facing error of dimensionality. Data set: I am currently working on one video, which has 4500 images of size (28,28) . The data set is in vectorized form so i get (4500,780) . I split the images using Timeseriessplit and reshape the images with x_train=x_train.reshape(-1, 28, 28, 1) x_test=x_test.reshape(-1, 28, 28, 1) My model is as follows model = models.Sequential() model.add(layers.ConvLSTM2D( filters=40, kernel_size=(3, 3), input_shape=

Neural network isn't learning for a first few epochs on Keras

僤鯓⒐⒋嵵緔 提交于 2020-02-05 14:39:20
问题 I'm testing simple networks on Keras with TensorFlow backend and I ran into an issue with using sigmoid activation function The network isn't leraning for first 5-10 epochs, and then everything is fine. I tried using initializers and regularizers, but that only made it worse. I use the network like this: import numpy as np import keras from numpy import expand_dims from keras.preprocessing.image import ImageDataGenerator from matplotlib import pyplot # load the image (x_train, y_train), (x

InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_1'

淺唱寂寞╮ 提交于 2020-02-05 09:19:31
问题 I trained a simple neural network with TensorFlow on the MNIST dataset. The training portion of the code works fine. However, when I feed a single image into the network, it gives me the following traceback: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1021, in _do_call return fn(*args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages

InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_1'

不羁的心 提交于 2020-02-05 09:19:01
问题 I trained a simple neural network with TensorFlow on the MNIST dataset. The training portion of the code works fine. However, when I feed a single image into the network, it gives me the following traceback: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1021, in _do_call return fn(*args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages

MNIST data set neural network, why is the network failing to classify images?

我是研究僧i 提交于 2020-02-05 06:29:12
问题 my neural network is failing at the training set and every iteration at gradient descent is decreasing the error, but the hypothesis vector values are decreasing each time. When I run the test set on the learned parameters, the network just outputs 1 as its guess for every image. So far, i've tried removing the sigmoid activation from the output, checked the gradients with gradient checking, and i've tried to put the dataset between the values 0-1. Heres an example of the hypothesis during