| 46 | return results |
| 47 | |
| 48 | def compare_outputs(outputs, expected_outputs): |
| 49 | assert len(outputs) == len(expected_outputs), 'Incorrect number of outputs' |
| 50 | for i in range(len(expected_outputs)): |
| 51 | assert outputs[i].shape == expected_outputs[i].shape, 'Incorrect output shape on output#{}'.format(i) |
| 52 | assert outputs[i].dtype == expected_outputs[i].dtype, 'Incorrect output data type on output#{}'.format(i) |
| 53 | assert outputs[i].all() == expected_outputs[i].all(), 'Incorrect output value on output#{}'.format(i) |