79738482

Date: 2025-08-18 09:23:01
Score: 1.5
Natty:
Report link

With recent versions of scikit-learn (e.g. 1.7.1), the answer of @piman314 can be greatly simplified.

def get_activations(mlp, x):
    activations = [x] + [None] * (mlp.n_layers_ - 1)
    activations = mlp._forward_pass(activations)
    return activations
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @piman314
  • Low reputation (0.5):
Posted by: Donshel