jpterry commited on
Commit
6449d83
·
1 Parent(s): 8514431

registering EN directly

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -255,16 +255,16 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
255
 
256
  # config.save_pretrained(save_directory=model_loading_name)
257
 
258
- model = EfficientNet(dropout=hparams.dropout,
259
- num_channels=hparams.num_channels,
260
- num_classes=hparams.num_classes,
261
- size=hparams.size,
262
- stochastic_depth_prob=hparams.stochastic_depth_prob,
263
- width_mult=hparams.width_mult,
264
- depth_mult=hparams.depth_mult,)
265
 
266
  AutoConfig.register(model_loading_name, EfficientNetConfig)
267
- AutoModel.register(EfficientNetConfig, model)
268
  # config = EfficientNetConfig.from_pretrained(model_loading_name)
269
 
270
  # model = EfficientNetPreTrained.from_pretrained(model_loading_name)
 
255
 
256
  # config.save_pretrained(save_directory=model_loading_name)
257
 
258
+ # model = EfficientNet(dropout=hparams.dropout,
259
+ # num_channels=hparams.num_channels,
260
+ # num_classes=hparams.num_classes,
261
+ # size=hparams.size,
262
+ # stochastic_depth_prob=hparams.stochastic_depth_prob,
263
+ # width_mult=hparams.width_mult,
264
+ # depth_mult=hparams.depth_mult,)
265
 
266
  AutoConfig.register(model_loading_name, EfficientNetConfig)
267
+ AutoModel.register(EfficientNetConfig, EfficientNet)
268
  # config = EfficientNetConfig.from_pretrained(model_loading_name)
269
 
270
  # model = EfficientNetPreTrained.from_pretrained(model_loading_name)