I worked with Feed Forward Neural Network and VAE and understood backpropagation algorithm. Now I build a VAE network, one layer of it is a very complex vector-to-vector function $f(x)$ (a general 'method' in the programming sense instead of a 'math' expression).
Thus, there is no gradient info for this layer. I guess one cannot train the entire network with such a gap, though other layers are differentiable. Is there any nice way to train such a network?
One thing in my mind is to approximate the gradient by slightly changing $x$ and computing $$ \frac{f(x+\delta)-f(x)}{ \delta} $$