简体   繁体   English

制作人工神经网络时如何确定激活,损失,优化器

[英]How to determine activation, loss, optimizer in keras while making artificial neural network

This is my dataframe 这是我的数据框

https://drive.google.com/file/d/1qAnyOkp_YayqzZ4i0CwqCTDiYTIOmv6I/view?usp=sharing https://drive.google.com/file/d/1qAnyOkp_YayqzZ4i0CwqCTDiYTIOmv6I/view?usp=sharing

I need to find the value of ra, last column of that dataset via the ANN 我需要通过ANN查找数据集的最后一列ra的值

I have used keras library to make that, here is my code 我已经使用keras库做到了,这是我的代码

https://gist.github.com/anonymous/9955247ad7341e5bc119556dead9fc71 https://gist.github.com/anonymous/9955247ad7341e5bc119556dead9fc71

But the y_pred variable has set of 0s in output. 但是y_pred变量的输出设置为0。 Am I doing anything wrong with activation function? 我激活功能有问题吗?

I need to predict the ra values with training dataset 我需要使用训练数据集预测ra值

PS: I am a newbie to datascience and just I have started learning it via udemy PS:我是数据科学的新手,只是我已经开始通过udemy学习它

You can remove the second hidden layer as simple Ann is enough for this and also we don't have to use activator at the output layer as it is regression problem. 您可以删除第二个隐藏层,因为简单的Ann就足够了,并且我们也不必在输出层使用激活器,因为这是回归问题。

Please see the sample code https://github.com/naveenkambham/MachineLearningModels/blob/master/NeuralNetwork.py . 请参阅示例代码https://github.com/naveenkambham/MachineLearningModels/blob/master/NeuralNetwork.py This is similar to your requirement. 这类似于您的要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Keras训练和调整人工多层感知器神经网络? - How to train and tune an artificial multilayer perceptron neural network using Keras? Keras - 人工神经网络 - 使用自定义激活时出错 function - Keras – Artificial Neural Networks - Error when using a custom activation function Keras神经网络输出函数参数/如何构造损失函数? - Keras neural network outputting function parameters / how to construct loss function? 我将如何测量/记录 keras / tensorflow 的人工神经网络算法的总训练时间? - How would I measure/record the total training time for an artificial neural network algorithm for keras / tensorflow? PyTorch 中的神经网络、损失和优化器是如何连接的? - How are neural networks, loss and optimizer connected in PyTorch? 人工神经网络中的规范化 - Normalization in the artificial neural network 实施人工神经网络时,如何减少训练值中的误差? - How can I reduce the error in my trained values while implementing Artificial Neural Network? 通过使用 Gan 神经网络的判别器使用 Keras 自定义 Keras 损失函数 - Custom Keras loss function with Keras by discriminator with Gan neural network 理解层和激活函数在 Keras 神经网络中的作用 - Understanding the role of layers and activation functions in Keras neural network 如何确定神经网络中的激活函数 - How to decide activation function in neural network
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM