jgpeters commited on
Commit
3fd5dd8
·
verified ·
1 Parent(s): a352c78

Upload model

Browse files
Files changed (2) hide show
  1. huggingface_wrapper.py +1 -14
  2. model.safetensors +2 -2
huggingface_wrapper.py CHANGED
@@ -1,7 +1,6 @@
1
  from transformers import PretrainedConfig, PreTrainedModel
2
  import metl.models as models
3
  from metl.main import *
4
- from metl.test_cnn import MNIST_CNN
5
 
6
  class METLConfig(PretrainedConfig):
7
  IDENT_UUID_MAP = IDENT_UUID_MAP
@@ -16,23 +15,11 @@ class METLConfig(PretrainedConfig):
16
  self.id = id
17
  super().__init__(**kwargs)
18
 
19
- # input_shape,
20
- # num_layers,
21
- # conv_kernel_sizes,
22
- # conv_channel_sizes,
23
- # pool_kernel_sizes
24
-
25
  class METLModel(PreTrainedModel):
26
  config_class = METLConfig
27
  def __init__(self, config:METLConfig):
28
  super().__init__(config)
29
- self.model = MNIST_CNN(
30
- input_shape=(28, 28),
31
- num_layers = 4,
32
- conv_kernel_sizes = [4, 3, 3, 3],
33
- conv_channel_sizes = [(1, 16), (16, 32), (32, 64), (64, 128)],
34
- pool_kernel_sizes = [2, 2, 2]
35
- )
36
  self.encoder = None
37
  self.config = config
38
 
 
1
  from transformers import PretrainedConfig, PreTrainedModel
2
  import metl.models as models
3
  from metl.main import *
 
4
 
5
  class METLConfig(PretrainedConfig):
6
  IDENT_UUID_MAP = IDENT_UUID_MAP
 
15
  self.id = id
16
  super().__init__(**kwargs)
17
 
 
 
 
 
 
 
18
  class METLModel(PreTrainedModel):
19
  config_class = METLConfig
20
  def __init__(self, config:METLConfig):
21
  super().__init__(config)
22
+ self.model = None
 
 
 
 
 
 
23
  self.encoder = None
24
  self.config = config
25
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:83f15e4d00e58747d8a38065dd176620918cb67ebef549ee8fbb0ef74a9b727f
3
- size 389768
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:597e8a6818e6d64d879f65f918efa2c53a0f4e0f2a6381ee05b9543013bb730b
3
+ size 176