Spaces:
Runtime error
Runtime error
changing model to efficientnet
Browse files- bayes/models.py +2 -1
- requirements.txt +1 -0
bayes/models.py
CHANGED
|
@@ -20,6 +20,7 @@ from sklearn.model_selection import train_test_split
|
|
| 20 |
import torch
|
| 21 |
from torchvision import models, transforms
|
| 22 |
|
|
|
|
| 23 |
from data.mnist.mnist_model import Net
|
| 24 |
|
| 25 |
def get_xtrain(segs):
|
|
@@ -40,7 +41,7 @@ def get_xtrain(segs):
|
|
| 40 |
def process_imagenet_get_model(data):
|
| 41 |
"""Gets wrapped imagenet model."""
|
| 42 |
# Get the vgg16 model, used in the experiments
|
| 43 |
-
model =
|
| 44 |
model.eval()
|
| 45 |
# model.cuda()
|
| 46 |
|
|
|
|
| 20 |
import torch
|
| 21 |
from torchvision import models, transforms
|
| 22 |
|
| 23 |
+
from efficientnet.tfkeras import EfficientNetB0
|
| 24 |
from data.mnist.mnist_model import Net
|
| 25 |
|
| 26 |
def get_xtrain(segs):
|
|
|
|
| 41 |
def process_imagenet_get_model(data):
|
| 42 |
"""Gets wrapped imagenet model."""
|
| 43 |
# Get the vgg16 model, used in the experiments
|
| 44 |
+
model = EfficientNetB0(weights='imagenet')
|
| 45 |
model.eval()
|
| 46 |
# model.cuda()
|
| 47 |
|
requirements.txt
CHANGED
|
@@ -37,6 +37,7 @@ dice-ml
|
|
| 37 |
distlib
|
| 38 |
distributed
|
| 39 |
drive-cli
|
|
|
|
| 40 |
entrypoints
|
| 41 |
fasttext
|
| 42 |
ffmpeg
|
|
|
|
| 37 |
distlib
|
| 38 |
distributed
|
| 39 |
drive-cli
|
| 40 |
+
efficientnet
|
| 41 |
entrypoints
|
| 42 |
fasttext
|
| 43 |
ffmpeg
|