I came across this blog post 24 mentioned in a comment to a question that has since been taken down from Stack Overflow 11.
The authors of the blog post seem like they’re attempting much more complicated modeling than I am, and are using TensorFlow, but it appears they are also looping through each point/kernel to calculate an overall density:
def density_output_layer(w, y, cluster_centers, sigma):
    output_kernels = []
    for center in cluster_centers:
        output_kernels.append(tf.reshape(gaussian_kernel(y, center, sigma), [-1, 1]))
    output_kernels = tf.concat(output_kernels, axis=1)
    output_nodes = tf.multiply(w, output_kernels)
    return tf.reduce_sum(output_nodes, axis=1) / total_weight