neural-network

How to set parameters of the Adadelta Algorithm in Tensorflow correctly?

邮差的信 提交于 2021-02-06 10:51:41
问题 I've been using Tensorflow for regression purposes. My neural net is very small with 10 input neurons, 12 hidden neurons in a single layer and 5 output neurons. activation function is relu cost is square distance between output and real value my neural net trains correctly with other optimizers such as GradientDescent, Adam, Adagrad. However when I try to use Adadelta, the neural net simply won't train. Variables stay the same at every step. I have tried with every initial learning_rate

Quantize a Keras neural network model

拈花ヽ惹草 提交于 2021-02-06 01:45:23
问题 Recently, I've started creating neural networks with Tensorflow + Keras and I would like to try the quantization feature available in Tensorflow. So far, experimenting with examples from TF tutorials worked just fine and I have this basic working example (from https://www.tensorflow.org/tutorials/keras/basic_classification): import tensorflow as tf from tensorflow import keras fashion_mnist = keras.datasets.fashion_mnist (train_images, train_labels), (test_images, test_labels) = fashion_mnist

Quantize a Keras neural network model

自作多情 提交于 2021-02-06 01:27:31
问题 Recently, I've started creating neural networks with Tensorflow + Keras and I would like to try the quantization feature available in Tensorflow. So far, experimenting with examples from TF tutorials worked just fine and I have this basic working example (from https://www.tensorflow.org/tutorials/keras/basic_classification): import tensorflow as tf from tensorflow import keras fashion_mnist = keras.datasets.fashion_mnist (train_images, train_labels), (test_images, test_labels) = fashion_mnist

Getting Started with Neural Networks (ANN)?

霸气de小男生 提交于 2021-02-05 13:33:39
问题 I've been involved with a lot of C-Programming and RT-Linux, now I want to do some Artificial Neural Networking. BUT: How do I get started? I'm also very interested in Evolutionary Algorithms(Learning Algorithms) and Artificial Intelligence. Where can I start learning all of this? 回答1: If you're just trying to get familiar with AI, then I would recommend that you take the Stanford's free online courses: https://www.ai-class.com/ http://www.ml-class.org/course/auth/welcome Get a good

Getting Started with Neural Networks (ANN)?

不羁的心 提交于 2021-02-05 13:30:36
问题 I've been involved with a lot of C-Programming and RT-Linux, now I want to do some Artificial Neural Networking. BUT: How do I get started? I'm also very interested in Evolutionary Algorithms(Learning Algorithms) and Artificial Intelligence. Where can I start learning all of this? 回答1: If you're just trying to get familiar with AI, then I would recommend that you take the Stanford's free online courses: https://www.ai-class.com/ http://www.ml-class.org/course/auth/welcome Get a good

Keras NN regression model gives low loss, and 0 acuracy

送分小仙女□ 提交于 2021-02-05 12:30:15
问题 I am having a problem with this NN regression model in keras. I am working on a cars dataset to predict the price based on 13 dimensions. In short, I have read it as pandas dataframe, converted numeric values to float, scaled the values, and then used one-hot encoding for categorical values, which has created a lot of new columns, but that does not concern me much at this point. What concerns me is that the accuracy is practically 0%, and I cannot figure out why. Dataset can be found here:

Keras NN regression model gives low loss, and 0 acuracy

邮差的信 提交于 2021-02-05 12:22:19
问题 I am having a problem with this NN regression model in keras. I am working on a cars dataset to predict the price based on 13 dimensions. In short, I have read it as pandas dataframe, converted numeric values to float, scaled the values, and then used one-hot encoding for categorical values, which has created a lot of new columns, but that does not concern me much at this point. What concerns me is that the accuracy is practically 0%, and I cannot figure out why. Dataset can be found here:

How is the hidden layer size determined for MLPRegressor in SciKitLearn?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-05 09:43:44
问题 Lets say I'm creating a neural net using the following code: from sklearn.neural_network import MLPRegressor model = MLPRegressor( hidden_layer_sizes=(100,), activation='identity' ) model.fit(X_train, y_train) For the hidden_layer_sizes , I simply set it to the default. However, I don't really understand how it works. What is the number of hidden layers in my definition? Is it 100? 回答1: From the docs: hidden_layer_sizes : tuple, length = n_layers - 2, default (100,) The ith element represents

How is the hidden layer size determined for MLPRegressor in SciKitLearn?

别说谁变了你拦得住时间么 提交于 2021-02-05 09:43:02
问题 Lets say I'm creating a neural net using the following code: from sklearn.neural_network import MLPRegressor model = MLPRegressor( hidden_layer_sizes=(100,), activation='identity' ) model.fit(X_train, y_train) For the hidden_layer_sizes , I simply set it to the default. However, I don't really understand how it works. What is the number of hidden layers in my definition? Is it 100? 回答1: From the docs: hidden_layer_sizes : tuple, length = n_layers - 2, default (100,) The ith element represents

Derivative in loss function in Keras

廉价感情. 提交于 2021-02-04 19:38:48
问题 I want to make following loss function in keras: Loss = mse + double_derivative(y_pred,x_train) I am not able to incorporate the derivative term. I have tried K.gradients(K.gradients(y_pred,x_train),x_train) but it does not help. I am getting error message: AttributeError: 'NoneType' object has no attribute 'op' def _loss_tensor(y_true, y_pred,x_train): l1 = K.mean(K.square(y_true - y_pred), axis=-1) sigma = 0.01 lamda = 3 term = K.square(sigma)*K.gradients(K.gradients(y_pred,x_train),x_train