  We introduce a novel neural network-based algorithm to compute optimal
transport (OT) plans for general cost functionals. In contrast to common
Euclidean costs, i.e., $\ell^1$ or $\ell^2$, such functionals provide more
flexibility and allow using auxiliary information, such as class labels, to
construct the required transport map. Existing methods for general costs are
discrete and have limitations in practice, i.e. they do not provide an
out-of-sample estimation. We address the challenge of designing a continuous OT
approach for general costs that generalizes to new data points in
high-dimensional spaces, such as images. Additionally, we provide the
theoretical error analysis for our recovered transport plans. As an
application, we construct a cost functional to map data distributions while
preserving the class-wise structure.
