Writing exponential family in canonical form I have the following pdf with support $x>0$:
$$f_{\mu}(x)=\frac{1}{\sqrt{2\pi x^3}}\textrm{exp}\left(-\frac{(x-\mu)^2}{2\mu^2x}\right)$$
This belongs to the exponential family, and I write this in the following form
$$f_{\mu}(x)=h(x)\space\textrm{exp}\left(\spaceη(\mu)T(x)\space-B(\mu)\right)$$
What I have thus far is by expanding the pdf is
$$h(x)=\frac{1}{\sqrt{2\pi x^3}}\textrm{exp}\left(-\frac{1}{2x}\right), η(\mu)=-\frac{1}{2\mu^2}, T(x)=x \space\textrm{and}\space B(\mu)=\frac{1}{\mu}$$
Something is wrong here, because when I write this in canonical form, i.e.
$$f_{\theta}(x)=h(x)\space\textrm{exp}\big(\theta x-b(\theta)\big)$$
I get the following
$$\theta=-\frac{1}{2\mu^2} \space\textrm{and}\space b(\theta)=\sqrt{-\frac{1}{2\theta}}$$
I want to rewrite the pdf in terms of $\theta$. Without this, I am unable to find the expectation, variance, fisher and so on in terms of $\theta$.
Can someone please tell me where I went wrong?

Since $$f_{\mu}(x)=\frac{1}{\sqrt{2\pi x^3}}\textrm{exp}\left(-\frac{(x-\mu)^2}{2\mu^2x}\right)=\frac{1}{\sqrt{2\pi x^3}}\textrm{exp}\left(-\frac{x}{2\mu^2}+\frac{1}{\mu}-\frac{1}{2x}\right)$$
one gets that
$$\eta(\mu)=\frac{-1}{2\mu^2}\qquad B(\mu)=-\frac{1}{\mu}$$
(hence a missing minus sign for $B$) and for the natural parameterisation
$$\theta=\frac{-1}{2\mu^2}\qquad b(\theta)=-\sqrt{-2\theta}$$
(hence the inverse of the proposed $b$).
