" centroids = [{\"cluster_no\": i, \"centroid\": centroid} for i, centroid in enumerate(kmeans.cluster_centers_)]\n",
"\n",
" return clusters, centroids\n"
" return clusters, centroids\n",
"\n"
]
},
{
...
...
@@ -253,7 +248,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 25,
"id": "b6e51e97-bc00-44fa-aeb2-88bb2faa83f3",
"metadata": {},
"outputs": [
...
...
@@ -264,7 +259,19 @@
"Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.predictions.transform.LayerNorm.weight', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.predictions.transform.dense.weight', 'cls.predictions.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.seq_relationship.bias', 'cls.predictions.transform.dense.bias']\n",
"- This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
"- This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",