Home | History | Annotate | Download | only in V1_0
      1 # model
      2 model = Model()
      3 
      4 i1 = Input("input", "TENSOR_FLOAT32", "{1, 4}") # batch = 1, depth = 1
      5 beta = Float32Scalar("beta", 0.000001)
      6 output = Output("output", "TENSOR_FLOAT32", "{1, 4}")
      7 
      8 # model 1
      9 model = model.Operation("SOFTMAX", i1, beta).To(output)
     10 
     11 # Example 1. Input in operand 0,
     12 input0 = {i1: [1., 2., 10., 20.]}
     13 
     14 output0 = {output: [.25, .25, .25, .25]}
     15 
     16 # Instantiate an example
     17 Example((input0, output0))
     18