I want to take a derivative with respect to $A$ and $B$ but I have a problem. The function is
$$f=\left\|\left(B^TA\right)\circ C\right\|_{F}^2$$ Where $\circ$ is Hadamrad product and $B^TA$ is a normal matrix multiplication. $B^TA$ and $C$ both are R by R matrix. Thank you.
$$B^t(A+ t a) \circ C = t B^t a \circ C.$$ Now, the Frobenius norm squared is just the inner product of the matrix with itself, so we get that the derivative is just $$2 (B^t a) \circ C.$$ All this because all the operations involved (except the final norm squared) are linear.