简体   繁体   English

如何更好地处理数据并为神经网络设置参数?

[英]How do I better process my data and set parameters for my Neural Network?

When I run my NN the only way to get any training to occur is if I divide X by 1000. The network also needs to be trained under 70000 times with a 0.03 training rate and if those values are larger the NN gets worse. 当我运行NN时,进行任何训练的唯一方法是将X除以1000。网络还需要在70000次之下以0.03的训练速率进行训练,如果这些值较大,NN会变得更糟。 I think this is a due to bad processing of data and maybe the lack of having biases, but I don't really know. 我认为这是由于数据处理不当以及可能缺乏偏见所致,但我真的不知道。 Code on Google Colab Google Colab上的代码

In short: all of the problems you mentioned and more. 简而言之:您提到的所有问题等等。

  • Scaling is essential, typically to 0 mean and a variance of 1 . 标度必不可少, 通常为0均值和1的方差 Otherwise, you will quickly saturate the hidden units, their gradients will be near zero and (almost) no learning will be possible. 否则,您将迅速使隐藏的单元饱和,它们的梯度将接近零,并且(几乎)将无法进行学习。
  • Bias is mandatory for such ANN. 对于这样的人工神经网络,偏差是强制性的。 It's like an offset for fitting linear function. 这就像是用于拟合线性函数的偏移量。 If you drop it, getting good fit will be very difficult. 如果您丢下它,则要保持健康就非常困难。
  • You seem to be checking accuracy on your training data. 您似乎正在检查训练数据的准确性。
  • You have very few training samples. 您的训练样本很少。
  • Sigmoid is proven to be poor choice. 乙状结肠被证明是不好的选择。 Use ReLU and check eg here for explanation. 使用ReLU并检查例如此处的解释。

Also, I'd recommend spending some time on learning Python before going into this. 另外,我建议您花一些时间来学习Python,然后再进行此操作。 For starter, avoid using global , it can get you unforeseen behaviour if you're not careful. 对于初学者,请避免使用global ,如果您不小心的话,可能会导致无法预料的行为。

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

相关问题 我如何使我的数据一维? - 神经网络 - How do i make my data 1-dimensional? - neural network 如何强制我的训练数据匹配我的神经网络的 output 形状? - How do I force my training data to match the output shape of my neural network? 如何调整我的神经网络以避免过度拟合 mnist 数据集? - How can I tune my neural network to avoid overfitting the mnist data set? 如何正确屏蔽卷积神经网络中的值 - How do I properly mask values in my Convolutional Neural Network 我怎么知道我的神经网络模型是否过度拟合(Keras) - How do I know if my Neural Network model is overfitting or not (Keras) 我如何将带有 openCV 的视频 stream 放入我的 pytorch neural.network? - How do i stream a video with openCV into my pytorch neural network? 如何让 Pygame 渲染适用于我的神经网络? - How do I get Pygame rendering to work for my neural network? 如何将我的训练数据输入到该神经网络 - How to Input my Training Data into this Neural Network 我是否在 neural.network 中错误标记了我的数据? - Am I mislabeling my data in my neural network? 如何在Keras实施的卷积神经网络的训练过程中修复我的骰子损失计算? - How can I fix my dice loss calculation during the training process of a convolutional neural network implemented in Keras?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM