Example #1
0
def test_resnet3d_152(resnet3d_test):
    """Test 152."""
    K.set_image_data_format('channels_last')
    model = Resnet3DBuilder.build_resnet_152((224, 224, 224, 1), 2)
    resnet3d_test(model)
    K.set_image_data_format('channels_first')
    model = Resnet3DBuilder.build_resnet_152((1, 512, 512, 256), 2)
    resnet3d_test(model)
Example #2
0
def test_bad_shape():
    """Input shape need to be 4."""
    K.set_image_data_format('channels_last')
    with pytest.raises(ValueError):
        Resnet3DBuilder.build_resnet_152((224, 224, 224), 2)