Difficulty: Easy Tags: Neural Networks
Amazon's review-helpfulness classifier uses dropout during training, and because dropout involves randomness, the mask is given directly rather than generated, so every submission is deterministically checkable.
out = (x * m) / p_keep
where m is the given binary mask and p_keep is the keep probability (inverted-dropout scaling,
matching a framework's Dropout at train time).
n p_keep
x_1 ... x_n
m_1 ... m_n
m_i is 0 or 1, given directly, not generated.
out, n values, 6 decimals.
1 <= n <= 10^5, 0 < p_keep <= 1Input
4 0.75
1.0 2.0 3.0 4.0
1 0 1 1
Output
1.333333 0.000000 4.000000 5.333333
No results yet
Run your code to check it against the examples, or submit to run every test.