     return (expected * log(expected / predicted)).sum()
 }
 
-/// Computes the softmax cross entropy (categorical cross entropy) between logits and labels.
+/// Returns the softmax cross entropy (categorical cross entropy) between logits and labels.
 ///
 /// - Parameters:
 ///   - logits: One-hot encoded outputs from a neural network.

    return (logPredicted - logExpected).squared().mean()
}

/// Computes the mean absolute error between predictions and expectations.
///
/// - Parameters:
///   - predicted: Predicted outputs from a neural network.

// See the License for the specific language governing permissions and
// limitations under the License.

/// Returns the mean squared error between predictions and labels.
///
/// - Parameters:
///   - predicted: Predicted outputs from a neural network.
