$\mathcal{F}$-EBM: Energy Based Learning of Functional Data