예제 #1
0
    def setUp(self):
        super(TestSearchsortedOp, self).setUp()
        self.op_class = SearchsortedOp
        self.op = SearchsortedOp()

        self.x = T.vector('x')
        self.v = T.tensor3('v')

        self.a = 30 * np.random.random(50).astype(config.floatX)
        self.b = 30 * np.random.random((8, 10, 5)).astype(config.floatX)
        self.idx_sorted = np.argsort(self.a).astype('int32')
예제 #2
0
    def setup_method(self):
        super().setup_method()
        self.op_class = SearchsortedOp
        self.op = SearchsortedOp()

        self.x = T.vector("x")
        self.v = T.tensor3("v")

        self.a = 30 * np.random.random(50).astype(config.floatX)
        self.b = 30 * np.random.random((8, 10, 5)).astype(config.floatX)
        self.idx_sorted = np.argsort(self.a).astype("int32")