def METHOD_NAME(self):
    """Test computing uncertainty for a CNN regression model."""
    n_samples = 10
    n_features = 2
    n_tasks = 1
    noise = 0.1
    np.random.seed(123)
    X = np.random.randn(n_samples, 10, n_features)
    y = np.sum(X, axis=(1, 2)) + np.random.normal(scale=noise,
                                                  size=(n_samples,))
    y = np.reshape(y, (n_samples, n_tasks))
    dataset = dc.data.NumpyDataset(X, y)
    model = dc.models.CNN(n_tasks,
                          n_features,
                          dims=1,
                          dropouts=0.1,
                          kernel_size=3,
                          pool_type='average',
                          mode='regression',
                          learning_rate=0.005,
                          uncertainty=True)
    # Fit trained model
    model.fit(dataset, nb_epoch=300)
    # Predict the output and uncertainty.
    pred, std = model.predict_uncertainty(dataset)
    assert np.mean(np.abs(y - pred)) < 0.3
    assert noise < np.mean(std) < 1.0