Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keras 3 migration #1716

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"**Author:** Md Awsafur Rahman<br>\n",
"**Date created:** 2023/09/14<br>\n",
"**Last modified:** 2023/09/14<br>\n",
"**Last modified:** 2024/01/10<br>\n",
"**Description:** Use pre-trained nlp models for multiplechoice task."
]
},
Expand Down Expand Up @@ -45,9 +45,10 @@
},
"outputs": [],
"source": [
"import keras_nlp\n",
"\n",
"import keras\n",
"import tensorflow as tf # For tf.data only.\n",
"import keras_nlp\n",
"import tensorflow as tf\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
Expand Down Expand Up @@ -856,9 +857,9 @@
" question = row.startphrase\n",
" pred_answer = f\"ending{pred_answers[i]}\"\n",
" true_answer = f\"ending{true_answers[i]}\"\n",
" print(f\"\u2753 Sentence {i+1}:\\n{question}\\n\")\n",
" print(f\"\u2705 True Ending: {true_answer}\\n >> {row[true_answer]}\\n\")\n",
" print(f\"\ud83e\udd16 Predicted Ending: {pred_answer}\\n >> {row[pred_answer]}\\n\")\n",
" print(f\"\u2753 Sentence {i+1}:\\n{question}\\n\")\n",
" print(f\"\u2705 True Ending: {true_answer}\\n >> {row[true_answer]}\\n\")\n",
" print(f\"\ud83e\udd16 Predicted Ending: {pred_answer}\\n >> {row[pred_answer]}\\n\")\n",
" print(\"-\" * 90, \"\\n\")"
]
},
Expand Down
Loading
Loading