summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/cfg/application/stateless_eval/example.model
blob: 1d2db15c3ba9949ec31fd78f615fb1084c4bae4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
model example {

    # All inputs that are not scalar (aka 0-dimensional tensor) must be declared
    input1: tensor(name{}, x[3])
    input2: tensor(x[3])

    constants {
        constant1: tensor(x[3]):{{x:0}:0.5, {x:1}:1.5, {x:2}:2.5}
        constant2: 3.0
        #constant1asLarge tensor(x[3]): file:constant1asLarge.json
    }

    constant constant1asLarge {
        type: tensor(x[3])
        file: constant1asLarge.json
    }

    function foo1() {
        expression: file:test.expression
    }

    function foo2() {
        expression: reduce(sum(input1 * input2, name) * constant(constant1asLarge), max, x) * constant2
        # expression: input1 * input2
    }

    function my_input1() {
        expression: tensor(d0[1]):[2]
    }

    function my_input2() {
        expression: tensor(d0[1]):[3]
    }

}