Add Overbrace to describe a column of matrix

Here's one (TikZ-free) possibility; \overmat writes its first argument above the entries enclosed in the second argument; \bovermat (in the second example below) acts analogously, but showing an overbrace. I also fixed the alignment of the expressions to the right using some phantoms:

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}

\newcommand\overmat[2]{%
  \makebox[0pt][l]{$\smash{\color{white}\overbrace{\phantom{%
    \begin{matrix}#2\end{matrix}}}^{\text{\color{black}#1}}}$}#2}
\newcommand\partialphantom{\vphantom{\frac{\partial e_{P,M}}{\partial w_{1,1}}}}

\begin{document}

\begin{equation}
\begin{matrix}
 J
 =
 \begin{bmatrix}
 \overmat{neuron 1}{\frac{\partial e_{1,1}}{\partial w_{1,1}}  & \frac{\partial e_{1,1}}{\partial w_{1,2}}} &
 \overmat{$\mkern-3.5mu\cdots$}{\cdots} & \overmat{neuron $j$}{\frac{\partial e_{1,1}}{\partial w_{j,1}} & \frac{\partial e_{1,1}}{\partial w_{j,1}}} & \cdots \\[0.5em]
%
 \frac{\partial e_{1,2}}{\partial w_{1,1}}  & \frac{\partial e_{1,2}}{\partial w_{1,2}} & 
 \cdots & \frac{\partial e_{1,2}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \cdots & \cdots & \cdots &
 \cdots & \cdots \\[0.5em]
%
 \frac{\partial e_{1,M}}{\partial w_{1,1}}  & \frac{\partial e_{1,M}}{\partial w_{1,2}} & 
 \cdots & \frac{\partial e_{1,M}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \cdots & \cdots & \cdots &
 \cdots & \cdots \\[0.5em]
%
 \frac{\partial e_{P,1}}{\partial w_{1,1}}  & \frac{\partial e_{P,1}}{\partial w_{1,2}} & 
 \cdots & \frac{\partial e_{P,1}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \frac{\partial e_{P,1}}{\partial w_{1,1}}  & \frac{\partial e_{np,2}}{\partial w_{1,2}} &
 \cdots & \frac{\partial e_{P,2}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \cdots & \cdots & \cdots &
 \cdots & \cdots \\[0.5em]
%
  \frac{\partial e_{P,M}}{\partial w_{1,1}}  & \frac{\partial e_{P,M}}{\partial w_{1,2}} & 
  \cdots & \frac{\partial e_{P,M}}{\partial w_{j,1}}  & \cdots \\[0.5em]
  \end{bmatrix}
  \begin{aligned}
  &\left.\begin{matrix}
  \partialphantom m = 1  \\[0.5em]
  \partialphantom m = 2  \\[0.5em]
  \cdots \\[0.5em]
  \partialphantom m = M  \\[0.5em]
  \end{matrix} \right\} %
  p = 1\\
  &\begin{matrix}
  \\[-1.67em]\phantom{\cdots}\cdots
  \end{matrix}\\ %
  &\left.\begin{matrix}
  \partialphantom m = 1  \\[0.5em]
  \partialphantom m = 2  \\[0.5em]
  \cdots \\[0.5em]
  \partialphantom m = M\\[0.5em]
  \end{matrix}\right\}%
  p = P\\
 \end{aligned}
 \end{matrix}
 \end{equation}

\end{document}

enter image description here

And a variation with braces:

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}

\newcommand\overmat[2]{%
  \makebox[0pt][l]{$\smash{\color{white}\overbrace{\phantom{%
    \begin{matrix}#2\end{matrix}}}^{\text{\color{black}#1}}}$}#2}
\newcommand\bovermat[2]{%
  \makebox[0pt][l]{$\smash{\overbrace{\phantom{%
    \begin{matrix}#2\end{matrix}}}^{\text{#1}}}$}#2}
\newcommand\partialphantom{\vphantom{\frac{\partial e_{P,M}}{\partial w_{1,1}}}}

\begin{document}

\begin{equation}
\begin{matrix}
 J
 =
 \begin{bmatrix}
 \bovermat{neuron 1}{\frac{\partial e_{1,1}}{\partial w_{1,1}}  & \frac{\partial e_{1,1}}{\partial w_{1,2}}} &
 \overmat{$\mkern-3.5mu\cdots$}{\cdots} & \bovermat{neuron $j$}{\frac{\partial e_{1,1}}{\partial w_{j,1}} & \frac{\partial e_{1,1}}{\partial w_{j,1}}} & \cdots \\[0.5em]
%
 \frac{\partial e_{1,2}}{\partial w_{1,1}}  & \frac{\partial e_{1,2}}{\partial w_{1,2}} & 
 \cdots & \frac{\partial e_{1,2}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \cdots & \cdots & \cdots &
 \cdots & \cdots \\[0.5em]
%
 \frac{\partial e_{1,M}}{\partial w_{1,1}}  & \frac{\partial e_{1,M}}{\partial w_{1,2}} & 
 \cdots & \frac{\partial e_{1,M}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \cdots & \cdots & \cdots &
 \cdots & \cdots \\[0.5em]
%
 \frac{\partial e_{P,1}}{\partial w_{1,1}}  & \frac{\partial e_{P,1}}{\partial w_{1,2}} & 
 \cdots & \frac{\partial e_{P,1}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \frac{\partial e_{P,1}}{\partial w_{1,1}}  & \frac{\partial e_{np,2}}{\partial w_{1,2}} &
 \cdots & \frac{\partial e_{P,2}}{\partial w_{j,1}}  & \cdots \\[0.5em]
%
 \cdots & \cdots & \cdots &
 \cdots & \cdots \\[0.5em]
%
  \frac{\partial e_{P,M}}{\partial w_{1,1}}  & \frac{\partial e_{P,M}}{\partial w_{1,2}} & 
  \cdots & \frac{\partial e_{P,M}}{\partial w_{j,1}}  & \cdots \\[0.5em]
  \end{bmatrix}
  \begin{aligned}
  &\left.\begin{matrix}
  \partialphantom m = 1  \\[0.5em]
  \partialphantom m = 2  \\[0.5em]
  \cdots \\[0.5em]
  \partialphantom m = M  \\[0.5em]
  \end{matrix} \right\} %
  p = 1\\
  &\begin{matrix}
  \\[-1.67em]\phantom{\cdots}\cdots
  \end{matrix}\\ %
  &\left.\begin{matrix}
  \partialphantom m = 1  \\[0.5em]
  \partialphantom m = 2  \\[0.5em]
  \cdots \\[0.5em]
  \partialphantom m = M\\[0.5em]
  \end{matrix}\right\}%
  p = P\\
 \end{aligned}
 \end{matrix}
 \end{equation}

\end{document}

enter image description here