예제 #1
0
def test_rnn_dim_check():
    L_SEQ, BAT, L_INP, L_STA = 2**31, 4, 2**10, 2
    data = np.random.uniform(-1, 1, (L_SEQ, BAT, L_INP))
    state = np.random.normal(0, 1, (1, BAT, L_STA))
    params = np.random.normal(0, 1, (2056, ))
    assertRaises(ValueError, npx.rnn, data=data, parameters=params, \
        mode='rnn_relu', state=state, state_size=L_STA, num_layers=1)
def test_training_with_trt():
    assertRaises(RuntimeError, run_resnet, is_train=True, use_tensorrt=True)
예제 #3
0
 def test_roi_pooling_large_dim():
     A = np.ones((1, 1, INT_OVERFLOW, 5))
     roi = np.array([[0, 0, 0, 5, 5]])
     assertRaises(MXNetError, npx.roi_pooling, A, roi, pooled_size=(3, 3), \
         spatial_scale=1)
예제 #4
0
 def test_pooling_large_dim():
     A = np.ones((1, 1, INT_OVERFLOW))
     assertRaises(MXNetError, npx.pooling, data=A, kernel=(2), stride=(2), \
             pool_type='max')
예제 #5
0
 def test_ctc_loss_size_check(A, label):
     assertRaises(ValueError, npx.ctc_loss, A, label)
예제 #6
0
def test_training_with_trt():
    assertRaises(RuntimeError, run_resnet, is_train=True, use_tensorrt=True)