Update modeling_prismatic.py
Browse files- modeling_prismatic.py +5 -3
modeling_prismatic.py
CHANGED
@@ -437,9 +437,7 @@ class PrismaticForConditionalGeneration(PrismaticPreTrainedModel):
|
|
437 |
|
438 |
return language_model_output
|
439 |
|
440 |
-
print("
|
441 |
-
print(language_model_output.attentions)
|
442 |
-
print("=" * 100)
|
443 |
|
444 |
|
445 |
return PrismaticCausalLMOutputWithPast(
|
@@ -487,6 +485,8 @@ class PrismaticForConditionalGeneration(PrismaticPreTrainedModel):
|
|
487 |
}
|
488 |
)
|
489 |
|
|
|
|
|
490 |
return model_inputs
|
491 |
|
492 |
# Defer to Language Model (all handle this differently, with different return types)
|
@@ -520,8 +520,10 @@ class OpenVLAForActionPrediction(PrismaticForConditionalGeneration):
|
|
520 |
)
|
521 |
|
522 |
# Run VLA inference
|
|
|
523 |
model_outputs = self.generate(input_ids, max_new_tokens=self.get_action_dim(unnorm_key), output_attentions=True, return_dict=True, **kwargs)
|
524 |
print(model_outputs.shape)
|
|
|
525 |
|
526 |
# Extract predicted action tokens and translate into (normalized) continuous actions
|
527 |
predicted_action_token_ids = generated_ids[0, -self.get_action_dim(unnorm_key) :].cpu().numpy()
|
|
|
437 |
|
438 |
return language_model_output
|
439 |
|
440 |
+
print("Forward")
|
|
|
|
|
441 |
|
442 |
|
443 |
return PrismaticCausalLMOutputWithPast(
|
|
|
485 |
}
|
486 |
)
|
487 |
|
488 |
+
print("Prepare")
|
489 |
+
|
490 |
return model_inputs
|
491 |
|
492 |
# Defer to Language Model (all handle this differently, with different return types)
|
|
|
520 |
)
|
521 |
|
522 |
# Run VLA inference
|
523 |
+
print("=" * 100)
|
524 |
model_outputs = self.generate(input_ids, max_new_tokens=self.get_action_dim(unnorm_key), output_attentions=True, return_dict=True, **kwargs)
|
525 |
print(model_outputs.shape)
|
526 |
+
print("=" * 100)
|
527 |
|
528 |
# Extract predicted action tokens and translate into (normalized) continuous actions
|
529 |
predicted_action_token_ids = generated_ids[0, -self.get_action_dim(unnorm_key) :].cpu().numpy()
|