This function checks if the fields of the NET structure have valid values.
Checks include: NetId should not be zero; NumInputs should be positive but
smaller than NumUnits;NumOutputs should be positive but smaller than
NumUnits;NumUnits should be positive; NumLayers should be positive but
smaller than NumUnits;NumLinks should be positive but smaller than
2 * NumUnits ^2; NumWeights should be positive; and FirstUnit,LastUnit
and FirstWeight should not be NULL.