Why do you need this method in a Layer? Just make an MLP containing only that Layer