Instead of accessing the model online, I downloaded a pre-trained EfficentNet model on my computer. My code works fine when I access the file online at: " https://tfhub.dev/google/imagenet/efficientnet_v2_imagenet21k_b0/feature_vector/2 " However, it doesn't work from my local machine; it throws this error message "OSError: SavedModel file does not exist at: C:/User/A/model/saved_model.pb". Can someone please help?
input_shape = (IMAGE_SIZE, IMAGE_SIZE, CHANNEL)
effinet_feature_extractor_model = "C:/User/A/model/saved_model.pb"
pretrained_effinet_model_without_top_layer = hub.KerasLayer(
effinet_feature_extractor_model, input_shape=input_shape, trainable=False)
关于什么
effinet_feature_extractor_model = r"C:\User\A\model\saved_model.pb"
我没有使用effinet_feature_extractor_model = "C:/User/A/model/saved_model.pb"
,而是使用effinet_feature_extractor_model = "C:/User/A/model/"
,问题就解决了!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.