Пример #1
0
     'block': PReLUNet(),
     'desc_inputs': [Tensor(np.ones([1, 3, 4, 4], np.float32))],
 }),
 ('PReLUGradNet', {
     'block': PReLUGradNet(),
     'desc_inputs': [Tensor(np.ones([1, 3, 4, 4], np.float32)),
                     Tensor(np.ones([1, 3, 4, 4], np.float32)),
                     Tensor(np.ones(3, np.float32))],
 }),
 ('MatrixDiag', {
     'block': nn.MatrixDiag(),
     'desc_inputs': [Tensor(np.array([1, 2, 3]).astype(np.float32))],
     'skip': ['backward']
 }),
 ('MatrixDiagPart', {
     'block': nn.MatrixDiagPart(),
     'desc_inputs': [Tensor(np.array([[1, 2, 3], [4, 5, 6]]).astype(np.float32))],
     'skip': ['backward']
 }),
 ('MatrixSetDiag', {
     'block': nn.MatrixSetDiag(),
     'desc_inputs': [Tensor(np.array([[1, 2, 3], [4, 5, 6]]).astype(np.float32)),
                     Tensor(np.array([1, 2]).astype(np.float32))],
     'skip': ['backward']
 }),
 ('LRNNet', {
     'block': LRNNet(),
     'desc_inputs': [Tensor(np.ones([1, 5, 4, 4], np.float32))],
 }),
 ('LRNGradNet', {
     'block': LRNGradNet(),
Пример #2
0
     'block':
     PReLUGradNet(),
     'desc_inputs': [
         Tensor(np.ones([1, 3, 4, 4], np.float32)),
         Tensor(np.ones([1, 3, 4, 4], np.float32)),
         Tensor(np.ones(3, np.float32))
     ],
 }),
 ('MatrixDiag', {
     'block': nn.MatrixDiag(),
     'desc_inputs': [Tensor(np.array([1, 2, 3]).astype(np.float32))],
     'skip': ['backward']
 }),
 ('MatrixDiagPart', {
     'block':
     nn.MatrixDiagPart(),
     'desc_inputs':
     [Tensor(np.array([[1, 2, 3], [4, 5, 6]]).astype(np.float32))],
     'skip': ['backward']
 }),
 ('MatrixSetDiag', {
     'block':
     nn.MatrixSetDiag(),
     'desc_inputs': [
         Tensor(np.array([[1, 2, 3], [4, 5, 6]]).astype(np.float32)),
         Tensor(np.array([1, 2]).astype(np.float32))
     ],
     'skip': ['backward']
 }),
 ('LRNNet', {
     'block': LRNNet(),