How to implement factorization machine using pymc3?

[the output of FM. ] (https://i.stack.imgur.com/R9wMZ.png)How to implement the FM model using pymc3? Typically, I have trouble customizing the distribution of output Y

I used to learn how to implement bpmf using pymc3 from : https://github.com/dockerizeme/dockerizeme/blob/d651393988c5fc87f15553d20f4930a97fcfbcfd/hard-gists/00a17b1d374dfc267a9a/snippet.py

Y = pm.Noraml(‘Y’, mu = w_0 + np.dot(W, X) + 0 , tau = alpha * np.ones((n,1)), observed = labels)