Skip to content

Commit d231b64

Browse files
authored
Add support for RandomContrast, RandomFlip, RandomHeight, RandomTranslation, RandomWidth, RandomZoom (#295)
* Add support for RandomContrast * Bump version number to 0.15.10 * Add support for RandomFlip, RandomHeight, RandomTranslation, RandomWidth, RandomZoom * Remove superfluous print aound model.summary()
1 parent 4b2eb0b commit d231b64

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ list(APPEND CMAKE_MODULE_PATH "${FDEEP_TOP_DIR}/cmake")
66

77
include(cmake/hunter.cmake) # default off
88

9-
project(frugally-deep VERSION 0.15.9)
9+
project(frugally-deep VERSION 0.15.10)
1010

1111
message(STATUS "===( ${PROJECT_NAME} ${PROJECT_VERSION} )===")
1212

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Just add a *conanfile.txt* with frugally-deep as a requirement and chose the gen
6363

6464
```
6565
[requires]
66-
frugally-deep/v0.15.9-p0@dobiasd/stable
66+
frugally-deep/v0.15.10-p0@dobiasd/stable
6767
6868
[generators]
6969
cmake

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ Layer types typically used in image recognition/generation are supported, making
4747
* `Conv1D/2D`, `SeparableConv2D`, `DepthwiseConv2D`
4848
* `Cropping1D/2D`, `ZeroPadding1D/2D`
4949
* `BatchNormalization`, `Dense`, `Flatten`
50-
* `Dropout`, `AlphaDropout`, `GaussianDropout`, `GaussianNoise`, `RandomRotation`
50+
* `Dropout`, `AlphaDropout`, `GaussianDropout`, `GaussianNoise`
5151
* `SpatialDropout1D`, `SpatialDropout2D`, `SpatialDropout3D`
52+
* `RandomContrast`, `RandomFlip`, `RandomHeight`
53+
* `RandomRotation`, `RandomTranslation`, `RandomWidth`, `RandomZoom`
5254
* `MaxPooling1D/2D`, `GlobalMaxPooling1D/2D`
5355
* `ELU`, `LeakyReLU`, `ReLU`, `SeLU`, `PReLU`
5456
* `Sigmoid`, `Softmax`, `Softplus`, `Tanh`

include/fdeep/import_model.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,13 @@ inline layer_ptr create_layer(const get_param_f& get_param,
11321132
{"SpatialDropout1D", create_identity_layer},
11331133
{"SpatialDropout2D", create_identity_layer},
11341134
{"SpatialDropout3D", create_identity_layer},
1135+
{"RandomContrast", create_identity_layer},
1136+
{"RandomFlip", create_identity_layer},
1137+
{"RandomHeight", create_identity_layer},
11351138
{"RandomRotation", create_identity_layer},
1139+
{"RandomTranslation", create_identity_layer},
1140+
{"RandomWidth", create_identity_layer},
1141+
{"RandomZoom", create_identity_layer},
11361142
{"LeakyReLU", create_leaky_relu_layer_isolated},
11371143
{"Permute", create_permute_layer },
11381144
{"PReLU", create_prelu_layer },

keras_export/generate_test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ def main():
877877
# Make sure models can be loaded again,
878878
# see https://github.com/fchollet/keras/issues/7682
879879
model = load_model(dest_path)
880-
print(model.summary())
880+
model.summary()
881881
# plot_model(model, to_file= str(model_name) + '.png', show_shapes=True, show_layer_names=True) #### DEBUG stateful
882882

883883

test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ WORKDIR /
2929
RUN git clone -b 'v0.2.15-p0' --single-branch --depth 1 https://github.com/Dobiasd/FunctionalPlus && cd FunctionalPlus && mkdir -p build && cd build && cmake .. && make && make install
3030
RUN git clone -b '3.3.9' --single-branch --depth 1 https://gitlab.com/libeigen/eigen.git && cd eigen && mkdir -p build && cd build && cmake .. && make && make install && ln -s /usr/local/include/eigen3/Eigen /usr/local/include/Eigen
3131
RUN git clone -b 'v3.9.1' --single-branch --depth 1 https://github.com/nlohmann/json && cd json && mkdir -p build && cd build && cmake -DBUILD_TESTING=OFF .. && make && make install
32-
RUN git clone -b 'v0.15.9-p0' --single-branch --depth 1 https://github.com/Dobiasd/frugally-deep && cd frugally-deep && mkdir -p build && cd build && cmake .. && make && make install
32+
RUN git clone -b 'v0.15.10-p0' --single-branch --depth 1 https://github.com/Dobiasd/frugally-deep && cd frugally-deep && mkdir -p build && cd build && cmake .. && make && make install
3333

3434
# To have downloaded the Keras models already
3535
RUN pip install numpy --upgrade

0 commit comments

Comments
 (0)