Activation.fromType constructor

Activation.fromType(
  1. String type
)

Implementation

factory Activation.fromType(String type) {
  switch (type) {
    case 'Sigmoid':
      return Sigmoid();
    case 'ReLU':
      return ReLU();
    case 'Tanh':
      return Tanh();
    case 'Gaussian':
      return Gaussian();
  }
  return Sigmoid();
}