Пример #1
0
def encode_inputs(lower_bounds, upper_bounds, netPrefix=''):
    vars = []
    for i, (l, h) in enumerate(zip(lower_bounds, upper_bounds)):
        input_var = Variable(0, i, netPrefix, 'i')
        input_var.setLo(l)
        input_var.setHi(h)
        vars.append(input_var)

    return vars
Пример #2
0
    def encode_inputs(self, lower_bounds, upper_bounds, netPrefix=''):
        vars = []
        for i, (l, h) in enumerate(zip(lower_bounds, upper_bounds)):
            input_var = Variable(0, i, netPrefix, 'i')
            input_var.setLo(l)
            input_var.setHi(h)
            vars.append(input_var)

        num_neurons = len(lower_bounds)
        return InputLayer(num_neurons, vars)