function E = eq(A,B)
  
  E =  get(A,'template')==get(B,'template') && ...
       ndims(A.weights)==ndims(B.weights) && ...
       all(size(A.weights)==size(B.weights)) && ...
       allv(A.weights==B.weights) && ...
       ndims(A.bias)==ndims(B.bias) && ...
       all(size(A.bias)==size(B.bias)) && ...
       allv(A.bias==B.bias)
