class_docstr: EfficientNet is a very efficient image-classification model. Trained on ImageNet.
  
  Attributes:
      model_path: Any efficientnet model (smaller to bigger) from efficientnet-b0 to efficientnet-b7
      init_model: Callable that initialises the model from the model_path
      name: string identifier for the model. Lowercase letters and numbers.
          No spaces/special characters except dashes.
      description: String description of the model.
      tasks: List of supported task strings
      details: Dictionary of additional details about the model
      device: Device for model. Defaults to "cuda" if available.
code: def __init__(
      self,
      model_path: str = "efficientnet-b0",
      init_model=None,
      name: str = None,
      description: str = None,
      tasks: List[str] = None,
      details: Dict = None,
      device=None,
  ):
      self.image_size = EfficientNet_pt.get_image_size(model_path)
      self.num_classes = 1000
  
      if init_model is None:
          init_model = partial(
              EfficientNet_pt.from_pretrained,
              num_classes=self.num_classes,
          )
  
      with open(
          download(IMAGENET_LABELS_URL, "efficientnet"), "r"
      ) as f:
          self.labels = json.load(f)
          self.labels = {int(k): v for k, v in self.labels.items()}
  
      self.tfms = transforms.Compose(
          [
              transforms.Resize(
                  self.image_size, interpolation=Image.BICUBIC
              ),
              transforms.CenterCrop(self.image_size),
              lambda image: image.convert("RGB"),
              transforms.ToTensor(),
              transforms.Normalize(
                  mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
              ),
          ]
      )
  
      tasks = tasks or ["image-classification"]
  
      self.optimal_batch_size = 128
      self.process_image = self.tfms
  
      PathModel.__init__(
          self,
          model_path,
          name=name,
          description=description,
          details=details,
          tasks=tasks,
          init_model=init_model,
          device=device,
      )
  
imports: import torch
  from PIL import Image
  from typing import Union, List, Dict
  from efficientnet_pytorch import EfficientNet
  from torchvision import transforms
  from torchvision.datasets import ImageFolder
  from random import shuffle
  from backprop.models import PathModel
  from backprop.utils.download import download
  from pytorch_lightning.callbacks.early_stopping import EarlyStopping
  from torch.utils.data import DataLoader
  from functools import partial
  import torch.nn.functional
  import pytorch_lightning
  import json
  import os
  from io import BytesIO
  import base64
  from backprop.utils.helpers import base64_to_img
label_desc: Use image node_id 1 to create a new EfficientNet object from inherited base classes: PathModel with example: obj = EfficientNet(model_path, init_model, name, description, tasks, details, device)