Spaces:
Running
on
T4
Running
on
T4
Added debugging texts to inside of gdino module
Browse files
models/GroundingDINO/groundingdino.py
CHANGED
@@ -398,6 +398,7 @@ class GroundingDINO(nn.Module):
|
|
398 |
dictionnaries containing the two above keys for each decoder layer.
|
399 |
"""
|
400 |
|
|
|
401 |
if targets is None:
|
402 |
captions = kw["captions"]
|
403 |
else:
|
@@ -405,9 +406,11 @@ class GroundingDINO(nn.Module):
|
|
405 |
|
406 |
# encoder texts
|
407 |
|
|
|
408 |
tokenized = self.tokenizer(captions, padding="longest", return_tensors="pt").to(
|
409 |
samples.device
|
410 |
)
|
|
|
411 |
|
412 |
one_hot_token = tokenized
|
413 |
|
|
|
398 |
dictionnaries containing the two above keys for each decoder layer.
|
399 |
"""
|
400 |
|
401 |
+
print("inside forward")
|
402 |
if targets is None:
|
403 |
captions = kw["captions"]
|
404 |
else:
|
|
|
406 |
|
407 |
# encoder texts
|
408 |
|
409 |
+
print("moving text to device")
|
410 |
tokenized = self.tokenizer(captions, padding="longest", return_tensors="pt").to(
|
411 |
samples.device
|
412 |
)
|
413 |
+
print("done moving text to device")
|
414 |
|
415 |
one_hot_token = tokenized
|
416 |
|