Instructions to use HichTala/DiffusionDet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HichTala/DiffusionDet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="HichTala/DiffusionDet", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HichTala/DiffusionDet", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_diffusiondet.py
Browse files- modeling_diffusiondet.py +1 -1
modeling_diffusiondet.py
CHANGED
|
@@ -127,7 +127,7 @@ class DiffusionDet(PreTrainedModel):
|
|
| 127 |
self.criterion = CriterionDynamicK(config, num_classes=self.num_classes, weight_dict=weight_dict)
|
| 128 |
|
| 129 |
def _init_weights(self, module):
|
| 130 |
-
torch.nn.init.
|
| 131 |
|
| 132 |
def predict_noise_from_start(self, x_t, t, x0):
|
| 133 |
return (
|
|
|
|
| 127 |
self.criterion = CriterionDynamicK(config, num_classes=self.num_classes, weight_dict=weight_dict)
|
| 128 |
|
| 129 |
def _init_weights(self, module):
|
| 130 |
+
torch.nn.init.xavier_uniform_(module.weight)
|
| 131 |
|
| 132 |
def predict_noise_from_start(self, x_t, t, x0):
|
| 133 |
return (
|