Create a weight matrix with Xavier (Glorot) uniform initialisation: draw each entry from U(−a,a) with a=6/(fan_in+fan_out), using np.random.default_rng(seed).uniform(-a, a, (fan_in, fan_out)).
Implement solve(fan_in,fan_out,seed=0).
Returns. Return a float NumPy array of shape (fan_in, fan_out).
Example 1
Input:
solve(2, 3, 0)
Output:
[[0.300068, -0.504372, -1.005677], [-1.059235, 0.686341, 0.904302]]
Example 2
Input:
solve(1, 1, 5)
Output:
[[1.056561]]
No results yet
Run your code to check it against the examples, or submit to run every test.