Exemplo n.º 1
0
    def check_type_forward(self, in_types):
        type_check.expect(in_types.size() == 1)
        a_type, = in_types

        type_check.expect(a_type.dtype == numpy.float32, )

        _check_ndim(a_type, lower=2, upper=3)

        a_idx = _get_check_index(self.transa, False, row_idx=1, col_idx=2)
Exemplo n.º 2
0
    def check_type_forward(self, in_types):
        type_check.expect(in_types.size() == 1)
        a_type, = in_types

        type_check.expect(a_type.dtype.kind == 'f', )

        _check_ndim(a_type)

        a_idx = _get_check_index(self.transa, False)
        a_size = _get_size(a_type, a_idx, 1)
Exemplo n.º 3
0
    def check_type_forward(self, in_types):
        type_check.expect(in_types.size() == 1)
        a_type = self.value
        b_type = in_types[0]

        type_check.expect(b_type.dtype.kind == 'f')

        _matmul._check_ndim(b_type)

        a_idx = _matmul._get_check_index(False, False)
        b_idx = _matmul._get_check_index(False, True)
        type_check.expect(a_type.shape[a_idx] == b_type.shape[b_idx])
Exemplo n.º 4
0
    def check_type_forward(self, in_types):
        type_check.expect(in_types.size() == 1)
        a_type = self.value
        b_type = in_types[0]

        type_check.expect(b_type.dtype.kind == "f")

        _matmul._check_ndim(b_type)

        b_type = _matmul._convert_type(b_type)
        a_idx = _matmul._get_check_index(False, False)
        b_idx = _matmul._get_check_index(False, True)
        type_check.expect(a_type.shape[a_idx] == b_type.shape[b_idx])
Exemplo n.º 5
0
    def check_type_forward(self, in_types):
        type_check.expect(in_types.size() == 1)
        a_type, = in_types

        type_check.expect(
            a_type.dtype == numpy.float32
#             ,
#             self.b.dtype == numpy.float32
        )

        _check_ndim(a_type, lower=2, upper=3)
#         _check_ndim(b_type, lower=2, upper=3)

        a_type = _convert_type(a_type, vector_ndim=2)
#         b_type = _convert_type(b_type, vector_ndim=2)
        a_idx = _get_check_index(self.transa, False, row_idx=1, col_idx=2)