Databricks-inspired batch inference service has a trained normalization layer whose running statistics are already fixed. You need to apply the inference-time BatchNorm transformation consistently so predictions do not change merely because request batches have different sizes.
Apply the inference-time batch-normalisation transform with fixed running statistics: y=γσ2+εx−μ+β with eps defaulting to 10−5. All of mean, var, gamma and beta may be scalars or arrays that broadcast against x.
Implement solve(x, mean, var, gamma, beta, eps=1e-5).
Returns. Return a float NumPy array with the shape of x.
Example 1
Input:
solve([1, 2, 3], [2], [0.25], [2], [0.5])
Output:
[-3.49992, 0.5, 4.49992]
Example 2
Input:
solve([4.0], 2.0, 4.0, 1.0, 0.0, eps=0.0)
Output:
[1.0]
No results yet
Run your code to check it against the examples, or submit to run every test.