Skip to content

Commit 531850f

Browse files
committed
update readme
1 parent d203438 commit 531850f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
# Or
3939
pip install -U git+https://github.com/leondgarse/keras_efficientnet_v2
4040
```
41-
- **Define model and load pretrained weights** Parameter `pretrained` is added in value `[None, "imagenet", "imagenet21k", "imagenet21k-ft1k"]`, default is `imagenet`.
41+
- **Define model and load pretrained weights** Parameter `pretrained` is added in value `[None, "imagenet", "imagenet21k", "imagenet21k-ft1k"]`, default is `imagenet`. Model input value should be in range `[-1, 1]`.
4242
```py
4343
# Will download and load `imagenet` pretrained weights.
4444
# Model weight is loaded with `by_name=True, skip_mismatch=True`.
@@ -50,9 +50,9 @@
5050
from tensorflow import keras
5151
from skimage.data import chelsea
5252
imm = tf.image.resize(chelsea(), model.input_shape[1:3]) # Chelsea the cat
53-
pred = model(tf.expand_dims(imm / 255, 0)).numpy()
53+
pred = model(tf.expand_dims(imm / 128. - 1., 0)).numpy()
5454
print(keras.applications.imagenet_utils.decode_predictions(pred)[0])
55-
# [('n02124075', 'Egyptian_cat', 0.89163685), ('n02123045', 'tabby', 0.01682318), ...]
55+
# [('n02124075', 'Egyptian_cat', 0.8642886), ('n02123159', 'tiger_cat', 0.030793495), ...]
5656
```
5757
Or download `h5` model and load directly
5858
```py
@@ -93,7 +93,7 @@
9393
| 7 | Conv1x1 & Pooling & FC | - | 1280 | 1 |
9494

9595
- Progressive training settings for EfficientNetV2
96-
96+
9797
| | S min | S max | M min | M max | L min | M max |
9898
| ------------ | ----- | ----- | ----- | ----- | ----- | ----- |
9999
| Image Size | 128 | 300 | 128 | 380 | 128 | 380 |

0 commit comments

Comments
 (0)