docs: def _init_weights(self,
                        X):
          """Set the weights and normalize data before starting training."""
          X = np.asarray(X, dtype=np.float64)
  
          if self.scaler is not None:
              X = self.scaler.fit_transform(X)
  
          if self.initializer is not None:
              self.weights = self.initializer(X, self.num_neurons)
  
          for v in self.params.values():
              v['value'] = v['orig']
  
          return X