Search code examples
pythontensorflowtensorflow-liteimage-classificationefficientnet

How to use EfficientNet-Lite4 with tensorflow Lite


I try to use EfficientNet-Lite4 on google colab with tensorflow Lite but i have an error name 'efficienetnet_lite4_spec' is not defined What should I do? Or does it only work with EfficientNet-Lite0? enter image description here


Solution

  • From comments

    Code change from

    model = image_classifier.create(train_data, model_spec=efficienetnet_lite4_spec,validation_data=validation_data,epochs=300)
    

    to

    model = image_classifier.create(train_data, model_spec=model_spec.get('efficientnet_lite4'),validation_data=validation_data,epochs=300)
    

    has resolved the issue (paraphrased from RJ Adriaansen & zeewa42)