Aakash-Tripathi commited on
Commit
214b1a7
·
verified ·
1 Parent(s): d3a1e03

Delete configuration_sybil.py

Browse files
Files changed (1) hide show
  1. configuration_sybil.py +0 -63
configuration_sybil.py DELETED
@@ -1,63 +0,0 @@
1
- """Sybil model configuration"""
2
-
3
- from transformers import PretrainedConfig
4
- from typing import Optional, List, Dict
5
- import json
6
-
7
-
8
- class SybilConfig(PretrainedConfig):
9
- """
10
- This is the configuration class to store the configuration of a [`SybilForRiskPrediction`].
11
- It is used to instantiate a Sybil model according to the specified arguments, defining the model architecture.
12
-
13
- Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs.
14
-
15
- Args:
16
- hidden_dim (`int`, *optional*, defaults to 512):
17
- Dimensionality of the hidden representations.
18
- dropout (`float`, *optional*, defaults to 0.0):
19
- The dropout probability for all fully connected layers.
20
- max_followup (`int`, *optional*, defaults to 6):
21
- Maximum number of years for risk prediction.
22
- num_images (`int`, *optional*, defaults to 208):
23
- Number of CT scan slices to process.
24
- img_size (`List[int]`, *optional*, defaults to `[512, 512]`):
25
- Size of input images after preprocessing.
26
- voxel_spacing (`List[float]`, *optional*, defaults to `[0.703125, 0.703125, 2.5]`):
27
- Target voxel spacing for CT scans (row, column, slice thickness).
28
- censoring_distribution (`str`, *optional*, defaults to "weibull"):
29
- Distribution used for censoring in survival analysis.
30
- ensemble_size (`int`, *optional*, defaults to 5):
31
- Number of models in the ensemble.
32
- calibrator_data (`Dict`, *optional*):
33
- Calibration data for risk score adjustment.
34
- """
35
-
36
- model_type = "sybil"
37
-
38
- def __init__(
39
- self,
40
- hidden_dim: int = 512,
41
- dropout: float = 0.0,
42
- max_followup: int = 6,
43
- num_images: int = 208,
44
- img_size: List[int] = None,
45
- voxel_spacing: List[float] = None,
46
- censoring_distribution: str = "weibull",
47
- ensemble_size: int = 5,
48
- calibrator_data: Optional[Dict] = None,
49
- initializer_range: float = 0.02,
50
- **kwargs
51
- ):
52
- super().__init__(**kwargs)
53
-
54
- self.hidden_dim = hidden_dim
55
- self.dropout = dropout
56
- self.max_followup = max_followup
57
- self.num_images = num_images
58
- self.img_size = img_size if img_size is not None else [512, 512]
59
- self.voxel_spacing = voxel_spacing if voxel_spacing is not None else [0.703125, 0.703125, 2.5]
60
- self.censoring_distribution = censoring_distribution
61
- self.ensemble_size = ensemble_size
62
- self.calibrator_data = calibrator_data
63
- self.initializer_range = initializer_range