wltjr1007 commited on
Commit
2e38869
·
verified ·
1 Parent(s): 586ba60

Upload ConditionalUNet

Browse files
config.json CHANGED
@@ -2,6 +2,11 @@
2
  "architectures": [
3
  "ConditionalUNet"
4
  ],
 
 
 
 
 
5
  "id2label": {
6
  "0": "LABEL_0",
7
  "1": "LABEL_1",
@@ -14,6 +19,7 @@
14
  "LABEL_2": 2,
15
  "LABEL_3": 3
16
  },
 
17
  "num_channels": 3,
18
  "torch_dtype": "float32",
19
  "transformers_version": "4.46.2"
 
2
  "architectures": [
3
  "ConditionalUNet"
4
  ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_conditional_unet.ConditionalUNetConfig",
7
+ "AutoModelForImageClassification": "modeling_conditional_unet.ConditionalUNet"
8
+ },
9
+ "encoder_rep": "evanrsl/resnet-Alzheimer",
10
  "id2label": {
11
  "0": "LABEL_0",
12
  "1": "LABEL_1",
 
19
  "LABEL_2": 2,
20
  "LABEL_3": 3
21
  },
22
+ "model_type": "conditional-unet",
23
  "num_channels": 3,
24
  "torch_dtype": "float32",
25
  "transformers_version": "4.46.2"
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:791ca306289c256b2cfe0260a5a6f2dad9b6f8c1348e93c7976734a4d327bca6
3
  size 293858844
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77d484e051e9ea45cc8ebbd871d27d3f30a912bf39f4df7b46834f0c33135dbe
3
  size 293858844
modeling_conditional_unet.py CHANGED
@@ -27,10 +27,11 @@ class UpSampleBlock(nn.Module):
27
  return x
28
 
29
  class ConditionalUNet(PreTrainedModel):
30
- config_class = "ConditionalUNetConfig"
31
 
32
- def __init__(self, config: ConditionalUNetConfig):
33
  super().__init__(config)
 
34
  self.config = config
35
 
36
  self.encoder_rep = config.encoder_rep
 
27
  return x
28
 
29
  class ConditionalUNet(PreTrainedModel):
30
+ config_class = ConditionalUNetConfig
31
 
32
+ def __init__(self, config):
33
  super().__init__(config)
34
+ # self.config_class = config.__class__
35
  self.config = config
36
 
37
  self.encoder_rep = config.encoder_rep