Skip to content

Commit

Permalink
remove unecessary print statments
Browse files Browse the repository at this point in the history
  • Loading branch information
staghado committed Oct 18, 2023
1 parent 1ed2469 commit 330eaf2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/transformers/models/vit/convert_vit_timm_to_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path):
# load HuggingFace model
if base_model:
model = ViTModel(config, add_pooling_layer=False).eval()
# print(model.state_dict().keys())
else:
model = ViTForImageClassification(config).eval()
model.load_state_dict(state_dict)
Expand All @@ -199,8 +198,6 @@ def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path):

if base_model:
timm_pooled_output = timm_model.forward_features(pixel_values)
print(timm_pooled_output)
print(outputs.last_hidden_state)
assert timm_pooled_output.shape == outputs.last_hidden_state.shape
assert torch.allclose(timm_pooled_output, outputs.last_hidden_state, atol=1e-1)
else:
Expand Down

0 comments on commit 330eaf2

Please sign in to comment.