mxnet.test_utils¶
Tools for testing.
Functions
|
Test if two numpy arrays are almost equal. |
|
Test that two NumPy arrays are almost equal (ignoring NaN in either array). |
|
Test that two numpy arrays are almost equal. |
|
Test that two NumPy arrays are almost equal (ignoring NaN in either array). |
|
Test that function f will throw an exception of type given by exception_type |
|
Return ndarray composed of passing each array value through some function |
|
Return ndarray composed of passing two array values through some function |
|
Check symbol gives the same output for different running context |
|
Verify an operation by checking backward pass via finite difference method. |
|
Check the running speed of a symbol. |
|
Compares a symbol’s backward results with the expected ones. |
|
Compares a symbol’s forward results with the expected ones. |
|
Run the chi-square test for the generator. |
|
Create a sparse array, For Rsp, assure indices are in a canonical format |
|
Create sparse array, using only rsp_indices to determine density |
Get default context for regression test. |
|
Get default data type for regression test. |
|
Discards error output of a routine if invoked as: |
|
|
Download an given URL |
|
Finds and returns the location of maximum violation. |
|
Generate the buckets and probabilities for chi_square test when the ppf (Quantile function) |
|
Get default numerical threshold for regression test. |
|
Download and extract bz2 data. |
Downloads CIFAR10 dataset into a directory in the current directory with the name data, and then extracts all files into the directory data/cifar. |
|
|
Get path to the im2rec.py tool |
Download and load the MNIST dataset |
|
|
Returns training and validation iterators for MNIST dataset |
Downloads MNIST dataset as a pkl.gz into a directory in the current directory with the name data |
|
Downloads ubyte version of the MNIST dataset into a directory in the current directory with the name data and extracts all files in the zip archive to this directory. |
|
|
Get default numerical threshold for regression test. |
|
Download and extract zip data. |
Return a list of GPUs |
|
|
Test the generator by matching the mean. |
|
Compatible reduce for old version of NumPy. |
|
Calculates a numeric gradient via finite difference method. |
|
|
|
|
|
|
|
|
|
Generate a random sparse ndarray. |
|
Generate some random numpy arrays. |
|
Return a k length list of the elements chosen from the population sequence. |
|
Retry n times before failing for stochastic test cases. |
|
Test if two NumPy arrays are the same. |
|
Check whether two NDArrays sharing the same memory block |
|
Set default context. |
|
Set environment variable |
Shuffle CSR column indices per row This allows validation of unordered column indices, which is not a requirement for a valid CSR matrix |
|
|
A simple forward function for a symbol. |
|
Test the generator by matching the variance. |
|
Verify whether the generator is correct using chi-square testing. |
Classes
|
A dummy iterator that always returns the same batch of data (the first data batch of the real data iter). |