<jupyter_start><jupyter_text>method 1<jupyter_code>from utils.helpers import Config 
c = Config()
dense_1 = c.LoadFeatures("densenet_features.pkl")

print(type(dense_1))
print(len(dense_1.keys()))
print(list(dense_1.keys())[:3])

feature_1 = dense_1['2293424366_7b5fcd2398']
print(feature_1)<jupyter_output><class 'dict'>
8091
['2293424366_7b5fcd2398', '3193335577_9bdbaf9f70', '524360969_472a7152f0']
[[9.5300304e-05 1.6891826e-03 5.1485118e-03 ... 2.3916087e+00
  7.8316832e-01 1.2584977e+00]]<jupyter_text>method 2<jupyter_code>import pickle 
filename = "data/Extracted_Features/densenet_features.pkl"
dense_2 =  pickle.load(open(filename, "rb"))
print(type(dense_2))
print(len(dense_2.keys()))
print(list(dense_2.keys())[:3])

feature_2 = dense_2['2293424366_7b5fcd2398']

print(feature_2.shape)
print(type(feature_2))<jupyter_output><class 'dict'>
8091
['2293424366_7b5fcd2398', '3193335577_9bdbaf9f70', '524360969_472a7152f0']
(1, 1024)
<class 'numpy.ndarray'><jupyter_text>compare 2 np arrays<jupyter_code>import numpy as np

np.allclose(feature_1,feature_2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15342465753424658, 'fraction_numerical': 0.20182648401826483, 'mean_word_length': 9.96, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '595885', 'license': 'MIT', 'n_tokens_mistral': 610, 'n_tokens_neox': 490, 'n_words': 56, 'path': '00_test.ipynb', 'repo_name': 'mutazag/imagecaptioning', 'size': '1095'}