mirror of
				https://github.com/rasbt/LLMs-from-scratch.git
				synced 2025-11-03 19:30:26 +00:00 
			
		
		
		
	use spam / not spam labels
This commit is contained in:
		
							parent
							
								
									45f6e72f40
								
							
						
					
					
						commit
						4b4e1e1ad5
					
				@ -2184,7 +2184,7 @@
 | 
				
			|||||||
    "    predicted_label = torch.argmax(logits, dim=-1).item()\n",
 | 
					    "    predicted_label = torch.argmax(logits, dim=-1).item()\n",
 | 
				
			||||||
    "\n",
 | 
					    "\n",
 | 
				
			||||||
    "    # Return the classified result\n",
 | 
					    "    # Return the classified result\n",
 | 
				
			||||||
    "    return \"Positive\" if predicted_label == 1 else \"Negative\""
 | 
					    "    return \"spam\" if predicted_label == 1 else \"not spam\""
 | 
				
			||||||
   ]
 | 
					   ]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@ -2211,7 +2211,7 @@
 | 
				
			|||||||
     "name": "stdout",
 | 
					     "name": "stdout",
 | 
				
			||||||
     "output_type": "stream",
 | 
					     "output_type": "stream",
 | 
				
			||||||
     "text": [
 | 
					     "text": [
 | 
				
			||||||
      "Positive\n"
 | 
					      "spam\n"
 | 
				
			||||||
     ]
 | 
					     ]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
   ],
 | 
					   ],
 | 
				
			||||||
@ -2242,7 +2242,7 @@
 | 
				
			|||||||
     "name": "stdout",
 | 
					     "name": "stdout",
 | 
				
			||||||
     "output_type": "stream",
 | 
					     "output_type": "stream",
 | 
				
			||||||
     "text": [
 | 
					     "text": [
 | 
				
			||||||
      "Negative\n"
 | 
					      "not spam\n"
 | 
				
			||||||
     ]
 | 
					     ]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
   ],
 | 
					   ],
 | 
				
			||||||
@ -2347,7 +2347,7 @@
 | 
				
			|||||||
   "name": "python",
 | 
					   "name": "python",
 | 
				
			||||||
   "nbconvert_exporter": "python",
 | 
					   "nbconvert_exporter": "python",
 | 
				
			||||||
   "pygments_lexer": "ipython3",
 | 
					   "pygments_lexer": "ipython3",
 | 
				
			||||||
   "version": "3.10.12"
 | 
					   "version": "3.11.4"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 },
 | 
					 },
 | 
				
			||||||
 "nbformat": 4,
 | 
					 "nbformat": 4,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user