Skip to content

Commit e22b46e

Browse files
committed
Updated readme
1 parent 578225c commit e22b46e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# EfficientNet PyTorch
22

3+
4+
_IMPORTANT NOTE_: In the latest update, I switched hosting providers for the pretrained models, as the previous models were becoming extremely expensive to host. This _will_ break old versions of the library. I apologize, but I cannot afford to keep serving the models on the old provider. Everything should work properly if you update the library:
5+
```
6+
pip install --upgrade efficientnet-pytorch
7+
```
8+
9+
### Update (January 23, 2020)
10+
11+
This update adds a new category of pre-trained model based on adversarial training, called _advprop_. It is important to note that the preprocessing required for the advprop pretrained models is slightly different from normal ImageNet preprocessing. As a result, by default, advprop models are not used. To load a model with advprop, use:
12+
```
13+
model = EfficientNet.from_pretrained("efficientnet-b0", advprop=True)
14+
```
15+
There is also a new, large `efficientnet-b8` pretrained model that is only available in advprop form. When using these models, replace ImageNet preprocessing code as follows:
16+
```
17+
if advprop: # for models using advprop pretrained weights
18+
normalize = transforms.Lambda(lambda img: img * 2.0 - 1.0)
19+
else:
20+
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
21+
std=[0.229, 0.224, 0.225])
22+
23+
```
24+
This update also addresses multiple other issues ([#115](https://github.com/lukemelas/EfficientNet-PyTorch/issues/115), [#128](https://github.com/lukemelas/EfficientNet-PyTorch/issues/128)).
25+
326
### Update (October 15, 2019)
427

528
This update allows you to choose whether to use a memory-efficient Swish activation. The memory-efficient version is chosen by default, but it cannot be used when exporting using PyTorch JIT. For this purpose, we have also included a standard (export-friendly) swish activation function. To switch to the export-friendly version, simply call `model.set_swish(memory_efficient=False)` after loading your desired model. This update addresses issues [#88](https://github.com/lukemelas/EfficientNet-PyTorch/pull/88) and [#89](https://github.com/lukemelas/EfficientNet-PyTorch/pull/89).

0 commit comments

Comments
 (0)