def toModelOp()

in wayang-api/wayang-api-json/src/main/scala/operatorfromjson/binary/DLTrainingOperatorFromJson.scala [40:58]


  def toModelOp(): ModelOp = {
    val recursiveOp: ModelOp = op match {
      case "ArgMax" => new ArgMax(dim)
      case "Cast" => new Cast(parseDType(dType))
      case "CrossEntropyLoss" => new CrossEntropyLoss(labels)
      case "Eq" => new Eq()
      case "Input" => new Input(parseInputType(opType))
      case "Mean" => new Mean(dim)
      case "Linear" => new Linear(inFeatures, outFeatures, bias)
      case "ReLU" => new ReLU()
      case "Sigmoid" => new Sigmoid()
      case "Softmax" => new Softmax()
    }

    val children = fromList.map(child => child.toModelOp())
    children.foreach(child => recursiveOp.`with`(child))

    recursiveOp
  }