<p>I think the answer to your question would be "yes". Though inference would always be best if you provide representative training data. For example you can train your net with <code>(c, b)</code> pairs, <code>(blank, b)</code> pairs, and <code>(c, blank)</code> pairs. That would make the net more robust and likely to support your use case. Training separate nets for each case would be more efficient and accurate - but I'm not sure what your goals and constraints are.</p>

<p>The point is a "blank" input can be trained for as well in the same net. In your case it's a new kind of <code>body_height</code> or <code>color_of_clothing</code>. I also suspect you might have issues with how you encode <code>blank</code> because e.g. <code>rgb(0, 0, 0)</code> would be black, and perhaps you intended to model <code>blank</code> as zero which would mean a blank is black.</p>

CC BY-SA 4.0
2018-08-01T07:12:27.210Z
2018-08-01T07:12:27.210Z
ubershmekel
<p>Say I'm training a neural net to compute the following function:</p>

<pre><code>(color_of_clothing, body_height) -&gt; gender
</code></pre>

<p>When using this network for prediction, I can obviously plug in a pair <code>(c, b)</code> to receive a predicted <code>g</code>, but say I want to get a prediction only based on <code>c</code> or only based on <code>b</code>, can I use the same neural net somehow? Or would I need to train two separate neural nets <code>c -&gt; g</code> and <code>b -&gt; g</code> previously?</p>

<p>Or more generally, can I use a neural net that was trained to predict <code>A -&gt; B</code> to make predictions on values from a subset of <code>A</code>, or should I train separate neural nets on all subsets of <code>A</code> that I'm interested in?</p>

<neural-networks>
Dealing with "blank" inputs in prediction of a neural network?
Oliver Friedmann
# Dealing with "blank" inputs in prediction of a neural network?

(Asked by: username_0 on 2018-07-31)

Say I'm training a neural net to compute the following function:
(color_of_clothing, body_height) -> gender

When using this network for prediction, I can obviously plug in a pair (c, b) to receive a predicted g, but say I want to get a prediction only based on c or only based on b, can I use the same neural net somehow? Or would I need to train two separate neural nets c -> g and b -> g previously?
Or more generally, can I use a neural net that was trained to predict A -> B to make predictions on values from a subset of A, or should I train separate neural nets on all subsets of A that I'm interested in?

**Tags:** neural-networks


---

## 1 answers

### Answer by username_1 on 2018-08-01. Score: 0 | Accepted answer

I think the answer to your question would be "yes". Though inference would always be best if you provide representative training data. For example you can train your net with `(c, b)` pairs, `(blank, b)` pairs, and `(c, blank)` pairs. That would make the net more robust and likely to support your use case. Training separate nets for each case would be more efficient and accurate - but I'm not sure what your goals and constraints are.

The point is a "blank" input can be trained for as well in the same net. In your case it's a new kind of `body_height` or `color_of_clothing`. I also suspect you might have issues with how you encode `blank` because e.g. `rgb(0, 0, 0)` would be black, and perhaps you intended to model `blank` as zero which would mean a blank is black.


---

