Energy Functions in Neural Networks with Continuous Local Functions