当输入数量可变时,如何使用神经网络? [英] How are neural networks used when the number of inputs could be variable?

查看:266
本文介绍了当输入数量可变时,如何使用神经网络?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所见过的神经网络的所有示例都是针对一组固定的输入,这些输入对图像和固定长度的数据都适用.您如何处理可变长度的数据,例如句子,查询或源代码?有没有一种方法可以将可变长度的数据编码为固定长度的输入,并且仍然获得神经网络的泛化特性?

All the examples I have seen of neural networks are for a fixed set of inputs which works well for images and fixed length data. How do you deal with variable length data such sentences, queries or source code? Is there a way to encode variable length data into fixed length inputs and still get the generalization properties of neural networks?

推荐答案

您通常会从数据中提取特征并将其提供给网络.不建议仅获取一些数据并将其馈入网络.实际上,预处理和选择正确的功能将决定您的成功和神经网络的性能.不幸的是,恕我直言,这需要经验来发展一种意识,而这是人们从书本中学到的东西.

You would usually extract features from the data and feed those to the network. It is not advisable to take just some data and feed it to net. In practice, pre-processing and choosing the right features will decide over your success and the performance of the neural net. Unfortunately, IMHO it takes experience to develop a sense for that and it's nothing one can learn from a book.

总结:垃圾进,垃圾出"

Summing up: "Garbage in, garbage out"

这篇关于当输入数量可变时,如何使用神经网络?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆