發表文章

目前顯示的是 5月, 2024的文章

李子誼Lambda匿名函式google colaboratory

圖片
  def x(m,n): #定義自訂函數x newList = [] for i in m: #迴圈將m的元素每個都執行 newList.append(n(i)) return newList #傳回去 m=['串列','李子誼','川普','拜登','敗家子'] n=lambda y: y + '是美女!' print(x(m,n)) for i in x(m,n): print(i) google機器學習實驗 教學影片 張量Tensor計算

李子誼拷貝程式碼大語言模型

圖片
WIKI大語言模型 大語言模型(英語:large language model,LLM)是一種語言模型,由具有許多參數(通常數十億個權重或更多)的人工神經網絡組成,使用自監督學習或半監督學習對大量未標記文本進行訓練[ 1 ]。大型語言模型在2018年左右出現,並在各種任務中表現出色[ 2 ]。 儘管這個術語沒有正式的定義,但它通常指的是參數數量在數十億或更多數量級的深度學習模型[3]。大型語言模型是通用的模型,在廣泛的任務中表現出色,而不是針對一項特定任務(例如情感分析、命名實體識別或數學推理)進行訓練[ 2 ]。 儘管在預測句子中的下一個單詞等簡單任務上接受過訓練,但發現具有足夠訓練和參數計數的神經語言模型可以捕獲人類語言的大部分句法和語義。 此外大型語言模型展示了相當多的關於世界的常識,並且能夠在訓練期間「記住」大量事實[2]。 雖然 ChatGPT 為代表的LLM在生成類人文本方面表現出了卓越的能力,但它們很容易繼承和放大訓練數據中存在的偏差。這可能表現為對不同人口統計數據的歪曲表述或不公平待遇,例如基於種族[4]、性別[ 5 ]、語言[ 6 ]和文化群體[ 6 ]的不同觀點與態度。 參考資料 Goled, Shraddha. Self-Supervised Learning Vs Semi-Supervised Learning: How They Differ. Analytics India Magazine. May 7, 2021 [2023-06-08]. (原始內容存檔於2023-06-18). Manning, Christopher D. Human Language Understanding & Reasoning. Daedalus. 2022, 151 (2): 127–138 [2023-06-08]. S2CID 248377870. doi:10.1162/daed_a_01905. (原始內容存檔於2023-03-09). Carlini, Nicholas; Tramer, Florian; Wallace, Eric; Jagielski, Matthew; Herbert-Voss, Ariel; Lee, Katherine; Roberts, Adam; Brown, Tom B; Song, Daw...

李子誼eval函數圖形介面計算機

圖片
W3SHOOLS 模仿美國男生計算機程式碼   from tkinter import * def button_press(num): global equation_text equation_text = equation_text + str(num) equation_label.set(equation_text) def equals(): global equation_text try: total = str(eval(equation_text)) equation_label.set(total) equation_text = total except SyntaxError: equation_label.set("syntax error") equation_text = "" except ZeroDivisionError: equation_label.set("arithmetic error") equation_text = "" def clear(): global equation_text equation_label.set("") equation_text = "" window = Tk() window.title("李子誼模仿美國人的計算") window.geometry("500x500") equation_text = "" equation_label = StringVar() label = Label(window, textvariable=equation_label, font=('consolas',20), bg="white", width=24, height=2) label.pack() frame = Frame(window) frame.pack() bu...

李子誼tkinter迴圈字串格式%d

圖片
執行409 from tkinter import * #下載程式碼,從tkinter輸入所有函式 import time x=['\U0001F600','\U0001F609','\U0001F602','\U0001F603','\U0001F604'] for i in range(5): window = Tk() #建構視窗,名為window建構一個房子 window.title('劉彩與的python視窗') window.geometry('300x300+%d+0' % (300*i)) b1=Label(window,text=x[i],font='Arial 300 bold').pack() time.sleep(0.3) window.update() window.mainloop() 執行410 from tkinter import * #下載程式碼,從tkinter輸入所有函式 import time window = Tk() #建構視窗,名為window建構一個房子 y=[] for i in range(5): window.title('劉天王的python視窗') window.geometry('400x400+%d+100' % (400*i)) b1=Label(window,text='\U0001F600',font='Arial 300 bold').pack() time.sleep(0.3) window.update() y.append(window)#追蹤特定視窗用途,尚未使用 window.mainloop()

李子誼Python建構constructor視窗%d控制輸出格式

圖片
控制STYLE的程式碼 <STYLE>   H1{BORDER:RED SOLID 5PX; PADDING:5PX; BACKGROUND-COLOR:PURPLE;TEXT-ALIGN:CENTER; COLOR:WHITE; BORDER-RADIUS:30PX;}   PRE{BORDER: BLUE SOLID 1PX;BACKGROUND-COLOR:DARKBLUE;COLOR:WHITE;FONT-WEIGHT:BOLD;} </STYLE> 單元409使用VS Code 單元409程式碼