Hugo Sereno Ferreira
Hugo Sereno Ferreira

Reputation: 8631

Variable Input in Feed-Forward Neural Networks

What are the most common strategies for having variable-length input in a feed-forward neural network?


To be more specific, consider the following hypothetical scenario:

  1. I've got a car with four sensors, two on the left (proximity and color) and two on the right (also proximity and color).
  2. There are two actuators (suppose left and right).
  3. I've successfully trained a neural network to correlate two sets of inputs (4 neurons proximity/color) over the set of outputs (2 neurons for direction).

Now the question is, how do I scale it for:

  1. A fixed upper-bound of same type sensors/actuators (say, 50); or even
  2. An arbitrary amount of sensors/actuators?

P.S.: My gut-feeling is that I would need a form of making neural-networks to compose, but I don't have the slightest idea of where to start.

Upvotes: 0

Views: 367

Answers (1)

Fred Foo
Fred Foo

Reputation: 363817

The simple solution is to always build vectors of some fixed, maximum number of features, and leave the inactive ones at a default value. The sensible default value is usually zero, esp. if you scale your inputs to the range [-1, 1].

Upvotes: 3

Related Questions