codebert-vulnerability-api / inspect_model.py
Lahiru-LK's picture
Upload 2 files
45041d3 verified
raw
history blame contribute delete
252 Bytes
import torch
# Load the saved model
checkpoint = torch.load('best_codebert_model.pt', map_location='cpu')
# Print the keys to understand the structure
print("Model keys:")
for key in list(checkpoint.keys())[:10]: # Print first 10 keys
print(key)