The expression for categorical cross-entropy loss can be obtained via the negative log likelihood.
In particular, let $C$ be the number of mutually exclusive classes in a multi-class classification problem, $\mathcal{D}=\left\{ (\mathbf{x}_{i},\mathbf{y}_{i})\right\} _{i=1}^{n}$ be the data, where $\mathbf{y}_{i}\in\left\{ 0,1\right\} ^{C}$ is the $i$-th label represented using the “one-hot” encoding, i.e. $y_{c}=0$ for all $c\in1:C$, except $y_{c^{*}}=1$ where $c^{*}$ is the number of the correct class. Let also $p_{c}(\mathbf{x}_{i})$ be the probability of the $c$-th class on the $i$-th data vector; then $$\mathsf{P}((\mathbf{x},\mathbf{y}))=p_{c^{*}}(\mathbf{x})=\prod_{c=1}^{C}p_{c}^{y_{c}}(\mathbf{x})$$ and the likelihood of the parameter vector $\boldsymbol{\theta}$ is $$\mathsf{L}(\boldsymbol{\theta}\mid\mathcal{D})=\prod_{(\mathbf{x},\mathbf{y})\in\mathcal{D}}\prod_{c=1}^{C}p_{c}^{y_{c}}(\mathbf{x}).$$ Hence the negative log likelihood is $$-\log\mathsf{L}(\boldsymbol{\theta}\mid\mathcal{D})=-\sum_{(\mathbf{x},\mathbf{y})\in\mathcal{D}}\sum_{c=1}^{C}y_{c}\log p_{c}(\mathbf{x}).$$
However, is this really the expression computed by Tensorflow?