Description
Problem Description
Both EfficientNet-Lite4 and EfficientNet-Lite2 feature-vector modules fail to download correctly when attempting to create a feature layer using tensorflow_hub.KerasLayer()
with the tfhub.dev URLs.
The temporary directory is created, but none of the files are downloaded/saved.
Error only occurs for EfficientNet-Lite2 and EfficientNet-Lite4 versions. Additional testing indicates that EfficientNet-Lite0, EfficientNet-Lite1, and EfficientNet-Lite3 work properly.
Issue first logged 2020-05-03.
Was previously working fine as of 2020-04-30
System Info:
OS: Windows 10
Python: 3.7.7
Tensorflow: 2.1.0
Tensorflow-Hub: 0.8.0
Code Snippet:
import tensorflow_hub as hub
import tensorflow as tf
# EfficientNet-Lite4
MODULE_HANDLE = "https://tfhub.dev/tensorflow/efficientnet/lite4/feature-vector/2"
EN4_feature_layer = hub.KerasLayer(MODULE_HANDLE)
# EfficientNet-Lite2
MODULE_HANDLE = "https://tfhub.dev/tensorflow/efficientnet/lite2/feature-vector/2"
EN2_feature_layer = hub.KerasLayer(MODULE_HANDLE)
Error
OSError: SavedModel file does not exist at: C:\Users\salernoa\AppData\Local\Temp\tfhub_modules\a3b91f2744273e376e489b1c60d6bddddebdc084/{saved_model.pbtxt|saved_model.pb}
Directory exists but is empty.
Current Workaround
Manually download and extract the feature vector modules for EfficientNet-Lite4 or EfficientNet-Lite2 from tfhub.dev, then create the KerasLayer
using the local path instead of the URL.