Tensorflow2 -- MNIST
TensorFlow 2.x 實作 MNIST 手寫數字辨識:比較繼承 tf.keras.Model 與 Sequential API 兩種建模方式,以及 GradientTape 自訂訓練迴圈的完整程式碼。
TensorFlow 2.x 實作 MNIST 手寫數字辨識:比較繼承 tf.keras.Model 與 Sequential API 兩種建模方式,以及 GradientTape 自訂訓練迴圈的完整程式碼。
用 Python 爬取台股即時股價:從 DevTools 找到證交所 getStockInfo API,解析 JSON 回應,取得台積電等個股的即時成交價、最高最低價與五檔報價。
使用 Google Cloud Natural Language API 進行中英文語意分析:從 GCP API Key 設定、JSON 請求格式,到解讀 partOfSpeech、lemma 和 dependencyEdge 結果。
ETL vs ELT: what each of the three steps does, why modern warehouses push the transform step to the target for performance, and where PAAS/SAAS fits in.
三引號字串只有放在模組、函式或類別的第一個陳述式才會變成 docstring 進到 __doc__,放在其他位置就是一段求值完丟掉的運算式,而 # 註解在語法階段就被忽略。用 __doc__ 和 dis 實際跑一次看兩者的差別。
學習 Python with 語句與 context manager:如何用 __enter__ 和 __exit__ 管理資源,確保文件、連線等資源被正確釋放,避免資源洩漏。
只實作 __getitem__ 的物件,for 迴圈跑得動、iter() 也拿得到 iterator,但 isinstance(obj, Iterable) 會回 False。本文用跑得出來的程式碼示範這個落差,並說明 iterator 為什麼只能走一遍。
KbWen is a developer and technical writer specializing in machine learning, LLMs, data engineering, and Python. Writing in Chinese and English since 2017.
介紹 Python 內建除錯工具 pdb 的三種使用方式:命令列直接執行、設定斷點以及 Python shell 中使用 pdb.pm(),讓你告別 print 除錯法。
OpenCV Haar Cascade 人臉偵測:AdaBoost 弱分類器級聯架構,scaleFactor 與 minNeighbors 到底在數什麼、為什麼要一起調,用 detectMultiScale2 讀出鄰居數量,以及這些 cascade 檔案在現在的 OpenCV 裡的狀態。