Neural nets with sample averaging