fix test notebook
Browse files- finetuning.ipynb +41 -12
finetuning.ipynb
CHANGED
@@ -940,7 +940,7 @@
|
|
940 |
},
|
941 |
{
|
942 |
"cell_type": "code",
|
943 |
-
"execution_count":
|
944 |
"metadata": {},
|
945 |
"outputs": [
|
946 |
{
|
@@ -951,21 +951,50 @@
|
|
951 |
"remote: Enforcing permissions... \n",
|
952 |
"remote: Allowed refs: all \n",
|
953 |
"To https://huggingface.co/ChainYo/segformer-sidewalk\n",
|
954 |
-
"
|
955 |
-
"\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
]
|
957 |
},
|
958 |
{
|
959 |
-
"
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
"
|
966 |
-
|
967 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
969 |
}
|
970 |
],
|
971 |
"source": [
|
|
|
940 |
},
|
941 |
{
|
942 |
"cell_type": "code",
|
943 |
+
"execution_count": 33,
|
944 |
"metadata": {},
|
945 |
"outputs": [
|
946 |
{
|
|
|
951 |
"remote: Enforcing permissions... \n",
|
952 |
"remote: Allowed refs: all \n",
|
953 |
"To https://huggingface.co/ChainYo/segformer-sidewalk\n",
|
954 |
+
" 56db83f..fcb528d main -> main\n",
|
955 |
+
"\n",
|
956 |
+
"Some weights of the model checkpoint at /home/chainyo/code/segformer-sidewalk/checkpoints/epoch=44-step=1125.ckpt were not used when initializing SegformerForSemanticSegmentation: ['pytorch-lightning_version', 'epoch', 'hyper_parameters', 'optimizer_states', 'loops', 'global_step', 'state_dict', 'callbacks', 'lr_schedulers', 'hparams_name']\n",
|
957 |
+
"- This IS expected if you are initializing SegformerForSemanticSegmentation 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",
|
958 |
+
"- This IS NOT expected if you are initializing SegformerForSemanticSegmentation from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
|
959 |
+
"Some weights of SegformerForSemanticSegmentation were not initialized from the model checkpoint at /home/chainyo/code/segformer-sidewalk/checkpoints/epoch=44-step=1125.ckpt and are newly initialized: ['encoder.block.1.0.mlp.dwconv.dwconv.weight', 'encoder.block.1.0.layer_norm_2.bias', 'encoder.block.1.0.attention.output.dense.weight', 'encoder.block.0.0.mlp.dwconv.dwconv.bias', 'decode_head.batch_norm.running_var', 'decode_head.linear_c.1.proj.weight', 'encoder.block.1.0.mlp.dense1.weight', 'encoder.block.3.1.attention.self.value.weight', 'encoder.block.2.1.attention.output.dense.weight', 'encoder.block.3.1.mlp.dense1.bias', 'encoder.block.1.1.attention.self.sr.weight', 'encoder.block.2.1.attention.self.sr.bias', 'encoder.block.2.0.attention.self.value.weight', 'encoder.block.1.0.attention.self.sr.bias', 'encoder.block.2.0.layer_norm_2.bias', 'encoder.block.0.1.layer_norm_1.weight', 'encoder.patch_embeddings.2.proj.weight', 'encoder.block.0.1.layer_norm_2.weight', 'encoder.block.3.1.mlp.dwconv.dwconv.bias', 'encoder.block.2.1.layer_norm_2.weight', 'encoder.block.2.1.layer_norm_2.bias', 'encoder.block.3.0.layer_norm_1.bias', 'encoder.block.1.0.attention.self.layer_norm.bias', 'encoder.block.0.1.attention.self.sr.weight', 'encoder.block.2.0.attention.self.sr.weight', 'encoder.block.2.0.attention.self.layer_norm.bias', 'decode_head.classifier.weight', 'encoder.block.3.1.attention.self.query.weight', 'encoder.block.1.0.mlp.dense1.bias', 'encoder.block.0.0.layer_norm_1.bias', 'encoder.block.0.1.mlp.dense1.weight', 'encoder.block.2.0.layer_norm_1.weight', 'encoder.block.0.0.mlp.dense2.weight', 'encoder.block.1.0.layer_norm_2.weight', 'encoder.block.2.1.attention.output.dense.bias', 'encoder.block.0.0.attention.self.value.bias', 'encoder.block.3.0.attention.self.query.bias', 'encoder.block.1.1.attention.self.layer_norm.bias', 'decode_head.linear_c.2.proj.weight', 'encoder.block.3.0.mlp.dense1.weight', 'encoder.block.3.0.mlp.dense1.bias', 'encoder.patch_embeddings.1.layer_norm.bias', 'encoder.block.3.1.mlp.dense2.weight', 'encoder.block.1.0.mlp.dwconv.dwconv.bias', 'encoder.block.1.0.attention.self.query.weight', 'encoder.block.2.0.attention.self.query.bias', 'encoder.block.3.0.attention.output.dense.bias', 'encoder.block.2.1.attention.self.sr.weight', 'decode_head.batch_norm.running_mean', 'encoder.block.3.0.attention.self.key.weight', 'encoder.block.0.1.attention.self.layer_norm.bias', 'encoder.block.0.0.attention.self.sr.bias', 'encoder.block.3.1.layer_norm_1.bias', 'encoder.block.0.1.attention.self.value.bias', 'encoder.block.0.1.attention.self.sr.bias', 'encoder.block.0.1.attention.self.key.weight', 'encoder.block.1.0.attention.self.value.bias', 'encoder.block.0.0.attention.self.layer_norm.weight', 'encoder.patch_embeddings.0.layer_norm.bias', 'encoder.patch_embeddings.3.proj.bias', 'encoder.block.1.1.attention.self.key.weight', 'encoder.block.1.1.attention.self.sr.bias', 'encoder.block.2.0.attention.self.key.weight', 'decode_head.linear_fuse.weight', 'encoder.block.0.1.mlp.dwconv.dwconv.bias', 'encoder.block.0.1.attention.self.layer_norm.weight', 'encoder.block.0.1.mlp.dwconv.dwconv.weight', 'encoder.block.2.0.layer_norm_1.bias', 'encoder.block.0.0.attention.self.query.bias', 'encoder.block.3.1.attention.self.key.bias', 'encoder.block.3.0.mlp.dwconv.dwconv.weight', 'encoder.block.0.0.attention.self.layer_norm.bias', 'encoder.block.0.0.layer_norm_1.weight', 'encoder.block.1.1.mlp.dense2.bias', 'encoder.block.3.1.layer_norm_2.weight', 'encoder.block.3.0.attention.output.dense.weight', 'encoder.block.1.0.layer_norm_1.weight', 'encoder.block.2.0.attention.self.layer_norm.weight', 'encoder.block.2.1.attention.self.layer_norm.weight', 'encoder.block.0.0.layer_norm_2.weight', 'encoder.patch_embeddings.1.layer_norm.weight', 'encoder.block.2.1.mlp.dwconv.dwconv.weight', 'encoder.block.3.1.attention.output.dense.bias', 'encoder.block.1.1.attention.self.query.weight', 'encoder.block.1.0.attention.self.key.bias', 'encoder.block.0.1.attention.self.value.weight', 'encoder.patch_embeddings.1.proj.weight', 'encoder.block.1.1.layer_norm_1.bias', 'encoder.block.1.1.attention.self.value.weight', 'encoder.block.3.0.mlp.dense2.weight', 'encoder.block.1.0.attention.self.value.weight', 'decode_head.classifier.bias', 'encoder.block.2.0.mlp.dwconv.dwconv.bias', 'encoder.block.1.1.attention.output.dense.weight', 'encoder.block.2.1.attention.self.query.weight', 'decode_head.batch_norm.num_batches_tracked', 'encoder.patch_embeddings.0.layer_norm.weight', 'decode_head.linear_c.3.proj.bias', 'encoder.block.0.1.attention.output.dense.bias', 'encoder.block.1.1.mlp.dwconv.dwconv.weight', 'encoder.block.2.1.attention.self.layer_norm.bias', 'encoder.block.2.1.mlp.dwconv.dwconv.bias', 'encoder.layer_norm.0.bias', 'encoder.patch_embeddings.3.layer_norm.weight', 'encoder.block.0.1.mlp.dense1.bias', 'encoder.block.1.1.mlp.dense2.weight', 'decode_head.batch_norm.weight', 'encoder.block.3.1.attention.self.query.bias', 'encoder.block.0.0.attention.output.dense.weight', 'encoder.block.1.1.layer_norm_1.weight', 'encoder.layer_norm.1.weight', 'encoder.block.3.0.mlp.dense2.bias', 'encoder.layer_norm.3.bias', 'encoder.block.0.0.mlp.dwconv.dwconv.weight', 'encoder.block.1.1.attention.output.dense.bias', 'encoder.block.2.1.layer_norm_1.weight', 'encoder.block.1.1.attention.self.layer_norm.weight', 'encoder.block.1.1.attention.self.key.bias', 'encoder.block.2.0.attention.self.value.bias', 'encoder.block.0.0.attention.self.key.bias', 'encoder.block.2.1.attention.self.key.bias', 'encoder.block.0.0.layer_norm_2.bias', 'encoder.block.1.1.layer_norm_2.weight', 'encoder.layer_norm.2.weight', 'decode_head.linear_c.0.proj.weight', 'encoder.block.1.0.attention.self.sr.weight', 'encoder.block.1.0.mlp.dense2.weight', 'encoder.block.2.0.mlp.dense1.weight', 'encoder.block.3.0.layer_norm_1.weight', 'encoder.patch_embeddings.1.proj.bias', 'decode_head.linear_c.3.proj.weight', 'encoder.block.1.1.mlp.dwconv.dwconv.bias', 'decode_head.linear_c.1.proj.bias', 'encoder.block.2.1.mlp.dense2.bias', 'encoder.patch_embeddings.3.layer_norm.bias', 'encoder.block.0.0.mlp.dense2.bias', 'encoder.block.3.1.layer_norm_2.bias', 'encoder.block.1.0.attention.output.dense.bias', 'encoder.patch_embeddings.0.proj.bias', 'encoder.block.2.1.attention.self.query.bias', 'encoder.block.2.1.mlp.dense1.bias', 'encoder.block.3.1.mlp.dwconv.dwconv.weight', 'encoder.block.0.1.layer_norm_2.bias', 'encoder.block.3.1.mlp.dense1.weight', 'encoder.block.1.0.attention.self.key.weight', 'encoder.block.1.1.mlp.dense1.weight', 'encoder.block.0.1.mlp.dense2.bias', 'encoder.block.0.1.attention.self.query.weight', 'encoder.block.2.0.attention.self.sr.bias', 'encoder.block.2.0.attention.output.dense.bias', 'encoder.block.2.1.mlp.dense1.weight', 'encoder.block.2.1.attention.self.value.bias', 'encoder.block.0.0.attention.self.key.weight', 'encoder.block.2.0.attention.self.key.bias', 'encoder.block.2.1.mlp.dense2.weight', 'decode_head.linear_c.0.proj.bias', 'encoder.block.3.1.attention.self.value.bias', 'encoder.block.0.1.attention.self.query.bias', 'encoder.block.3.0.attention.self.key.bias', 'encoder.patch_embeddings.2.proj.bias', 'encoder.layer_norm.1.bias', 'encoder.block.2.0.attention.self.query.weight', 'encoder.layer_norm.0.weight', 'encoder.block.0.0.attention.self.query.weight', 'encoder.block.0.1.attention.output.dense.weight', 'encoder.block.1.0.attention.self.query.bias', 'encoder.block.2.1.attention.self.key.weight', 'encoder.block.1.0.attention.self.layer_norm.weight', 'encoder.block.3.0.layer_norm_2.weight', 'encoder.block.0.0.attention.self.value.weight', 'encoder.block.0.0.mlp.dense1.bias', 'encoder.block.2.0.layer_norm_2.weight', 'encoder.patch_embeddings.3.proj.weight', 'encoder.block.1.0.mlp.dense2.bias', 'encoder.block.1.1.mlp.dense1.bias', 'encoder.block.3.1.attention.output.dense.weight', 'encoder.block.0.1.layer_norm_1.bias', 'encoder.block.0.0.attention.output.dense.bias', 'encoder.block.3.1.layer_norm_1.weight', 'decode_head.batch_norm.bias', 'encoder.block.2.0.mlp.dwconv.dwconv.weight', 'encoder.block.3.0.mlp.dwconv.dwconv.bias', 'encoder.block.2.1.layer_norm_1.bias', 'encoder.patch_embeddings.2.layer_norm.weight', 'encoder.block.2.0.mlp.dense1.bias', 'encoder.block.3.1.attention.self.key.weight', 'encoder.block.0.0.mlp.dense1.weight', 'encoder.block.1.1.attention.self.query.bias', 'encoder.block.3.0.attention.self.query.weight', 'decode_head.linear_c.2.proj.bias', 'encoder.layer_norm.2.bias', 'encoder.block.0.0.attention.self.sr.weight', 'encoder.block.3.0.layer_norm_2.bias', 'encoder.block.1.0.layer_norm_1.bias', 'encoder.layer_norm.3.weight', 'encoder.block.0.1.mlp.dense2.weight', 'encoder.block.2.0.mlp.dense2.weight', 'encoder.block.0.1.attention.self.key.bias', 'encoder.block.1.1.attention.self.value.bias', 'encoder.block.2.1.attention.self.value.weight', 'encoder.block.1.1.layer_norm_2.bias', 'encoder.block.3.0.attention.self.value.bias', 'encoder.patch_embeddings.2.layer_norm.bias', 'encoder.block.2.0.attention.output.dense.weight', 'encoder.block.3.1.mlp.dense2.bias', 'encoder.block.3.0.attention.self.value.weight', 'encoder.patch_embeddings.0.proj.weight', 'encoder.block.2.0.mlp.dense2.bias']\n",
|
960 |
+
"You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n",
|
961 |
+
"/home/chainyo/code/segformer-sidewalk/. is already a clone of https://huggingface.co/ChainYo/segformer-sidewalk. Make sure you pull the latest changes with `repo.git_pull()`.\n"
|
962 |
]
|
963 |
},
|
964 |
{
|
965 |
+
"data": {
|
966 |
+
"application/vnd.jupyter.widget-view+json": {
|
967 |
+
"model_id": "99e53578044149a1ac2cb3a53bc93015",
|
968 |
+
"version_major": 2,
|
969 |
+
"version_minor": 0
|
970 |
+
},
|
971 |
+
"text/plain": [
|
972 |
+
"Upload file pytorch_model.bin: 0%| | 32.0k/14.3M [00:00<?, ?B/s]"
|
973 |
+
]
|
974 |
+
},
|
975 |
+
"metadata": {},
|
976 |
+
"output_type": "display_data"
|
977 |
+
},
|
978 |
+
{
|
979 |
+
"name": "stderr",
|
980 |
+
"output_type": "stream",
|
981 |
+
"text": [
|
982 |
+
"remote: Enforcing permissions... \n",
|
983 |
+
"remote: Allowed refs: all \n",
|
984 |
+
"To https://huggingface.co/ChainYo/segformer-sidewalk\n",
|
985 |
+
" fcb528d..8370452 main -> main\n",
|
986 |
+
"\n"
|
987 |
]
|
988 |
+
},
|
989 |
+
{
|
990 |
+
"data": {
|
991 |
+
"text/plain": [
|
992 |
+
"'https://huggingface.co/ChainYo/segformer-sidewalk/commit/83704520224204a5932e7a7e174051010a99fe83'"
|
993 |
+
]
|
994 |
+
},
|
995 |
+
"execution_count": 33,
|
996 |
+
"metadata": {},
|
997 |
+
"output_type": "execute_result"
|
998 |
}
|
999 |
],
|
1000 |
"source": [
|