remove cells that are not needed
},
"outputs": [],
"source": [
- "# del summarizer\n",
- "checkpoint = torch.load(\"./abstemp/./bertsumabs.pt\")\n",
- "summarizer = BertSumAbs(\n",
- " processor, cache_dir=CACHE_PATH, max_pos_length=MAX_POS\n",
- ")\n",
- "summarizer.model.load_checkpoint(checkpoint['model'])"
+ "\n",
+ "# checkpoint = torch.load(os.path.join(CACHE_PATH, \"./bertsumabs.pt\"))\n",
+ "# summarizer = BertSumAbs(\n",
+ "# processor, cache_dir=CACHE_PATH, max_pos_length=MAX_POS\n",
+ "# )\n",
+ "# summarizer.model.load_checkpoint(checkpoint['model'])"
]
},
{
"torch.cuda.empty_cache()"
]
},
- {
- "cell_type": "code",
- "execution_count": 27,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "287227"
- ]
- },
- "execution_count": 27,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "len(train_dataset)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 25,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "32\n"
- ]
- }
- ],
- "source": [
- "QUICK_RUN\n",
- "# TOP_N = 32\n",
- "if not QUICK_RUN:\n",
- " TOP_N = len(test_dataset)\n",
- "print(TOP_N)"
- ]
- },
{
"cell_type": "code",
"execution_count": 35,
