eyu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    <title>人工智慧</title> # 人工智慧課程 # 0913 ## 期末報告 五人一組 利用生成式AI工具,製作行銷企劃案,行銷自己的家鄉的一樣特色 > 一定要有對工具使用的反思,並且要有正反面的反思 > 本堂課的期末報告可以用於未來的其他課程 ## 上課規範 期中考 > 60%的考題會提前公告,剩餘40%的考題不公告,希望學生能認真複習 隨堂考試 > 每堂課皆有隨堂考,考試範圍為上一堂課的課程內容 > 有複習課程內容,小考就可以應付 筆記 > 課程筆記列入平時成績計算 ## anaconda安裝 >套件 >conda create -n TF python=3.10 anaconda activate TF pip install tensorflow==2.12.0 pip install keras(已經不需要了) # 0920 ## 人工智慧簡介 >人工智慧分成多個領域,包含深度/機器學習、自然語言處裡、語音辨識等 > 1950's - 1980's談人工智慧、想像 > 1980's - 2010's談機器學習,想利用電腦複製人類的思考模式 > 2010's - ??? 談深度學習 ## 特徵標記、提取 > 機器學習 what means特徵? 具有差異性的部分即為特徵 > 深度學習 多層次隱藏神經元,利用邏輯運算推測特徵 > 差異:機器學習需要由人類標定特徵(如自駕車對物體辨識需要由人類自行標記),深度學習則經由大量投喂資料的過程,由電腦尋找類似的點,因此隱藏的神經元更多 ## 機器學習 >監督式學習:有正確解答者為監督式學習>目標>抹平最適曲線的不平滑處 >強化式學習:利用獎勵機制,利用數據上的正向強化機制推動機器學習 >非監督式學習:利用大量無標記資料,主動分類資料>物以類聚 ## 類神經網路 >名為類神經網路之原因是源自其結構類似動物神經細胞,模擬細胞運算原理 >分為輸入層、隱藏層、輸出層,每層皆由數個感測器構成 >輸入層接收資料 >隱藏層負責計算資料,而深度學習的準度高源自於其內部的層數高達上千層,可以進行更精細的運算 >輸出層負責輸出資料 >感測器又分成屬性質、權重、其積、和、門檻值 # 0927 ## 大數據 >具有4v,巨量 多樣 及時 資料真實性 資料的價值(volume,variety,velocity,value,veracity) # 1004 Random forest 用途:多次學習後找出更好的結果 圖像化神經網路(GNN)將圖像向量化 卷積神經網路(CNN) 多層次卷積找出特徵 仿生神經網路(DNN) 長短期記憶(LSTM)預測規律性高的行為 將圖片灰階化 再解出像素值 神經網路的歷史 one hot 紀錄字彙的位置 但造成資料稀疏的後果 NLP 自然語言處理 將詞彙向量化後解析詞語 詞向量 用字的相似度說明詞彙相似度(用脈絡字預測目標字) #1011 Q1何謂 GAN、GAN's structure 對抗式生成網路 生成器網路<相對>鑑別器網路 GAN 對抗式生成網路,由兩個部分構成,一是鑑別網路 二是生成網路,透過兩者間互相對抗產生回饋的結果,重新學習,直到模仿效果 潛在空間:從各種樣本中去找出特徵,比較後找出其中的差異(抽象化的多維度空間) CycleGAN:CycleGAN! 是一種將GAN應用於影像風格轉換(Image translation)的非監督式學習演算法 alphago包含三種技術 門第卡蘿樹搜尋法 監督式學習 深度強化式學習 [](https://hackmd.io/_uploads/HJ3cW9XWT.png) ## 1025 台中位於台灣中部,是一個充滿活力和文化多樣性的城市,擁有許多令人驚豔的旅遊景點。以下是一些台中的熱門旅遊景點: 國立自然科學博物館:這是台灣最大的自然科學博物館之一,展示了各種自然和生態學的展覽,包括恐龍化石、古生物、星象館,以及豐富的生態展示。博物館內還有一個巨大的IMAX電影院。 彩虹眷村:位於台中市北屯區的彩虹眷村是一個由老街改造而成的社區,充滿了色彩繽紛的壁畫和藝術品。這個地方非常受遊客歡迎,可以在這裡欣賞藝術、品味當地小吃,並拍照留念。 東海大學:東海大學擁有美麗的校園,建築風格獨特。校內的東海大學教堂是一個受歡迎的拍照地點,也是一個寧靜的地方,適合漫遊或享受安靜的時光。 蓮池潭:蓮池潭是一個風景如畫的湖泊,被綠樹和山脈環繞。遊客可以租船遊湖,或沿湖岸散步,享受大自然的美景。(error) 台中國家歌劇院:這個現代化的劇院是台灣重要的文化場所,舉辦各種音樂會、舞蹈表演和戲劇演出。即使你不打算觀看表演,也可以參觀這個建築物,欣賞其獨特的設計。 草悟道:草悟道是一條充滿綠意的自行車和行人道路,沿著台中港旁邊(error),提供寧靜的環境,適合散步和騎腳踏車。 高美濕地:這個自然保護區是候鳥的棲息地,也是一個重要的生態觀察點。遊客可以在木棧道上散步,觀察各種水鳥和動植物。 台中文創園區:這個區域充滿藝術氛圍,擁有許多藝廊、文創店鋪和設計工作室。這是一個探索當地藝術和文化的好地方。 這些僅僅是台中眾多旅遊景點中的一部分,這個城市還有更多有趣的地方等待你探索。無論你是對自然、文化、藝術還是美食有興趣,台中都能滿足你的需求。 ## 1115 ### sigmoid 適用於二元樹相關內容 ### ### ## 1122 ### 深度學習訓練 ### 梯度下降 ### 損失函數 function: (C= sum(Yi-Yj)^2)/n ### 藉由訓練將誤差最小化 Local minimum SDG Momentum adgrad rmsprop adam momentum momentum就是慣性或動量的意思,利用物理的概念做更新。如下圖所示,藍色線是位移,而綠色線代表就是momentum,它可以解決停在local minimum的問題。如第二張圖所示,當球滾到最右邊的時候,gradient告訴我們的方向是往左,可能會卡在local minmum的地方,但是如果加上momemtum是有可能可以往右前進,突破local minmum。 ADGRAD 跟RMSProp很類似,每次更新都會調整新舊gradient的比重。所以Adam繼承兩者的優點,適合大部分的狀況 RMS 每一次更新learning rate時,分母所除的σ都與前一次的有關係,調整上面多了一個參數 𝛼,可以自由調整新舊gradient的比重(影響力)。 ### 從局部最小值脫離( 小考) ### 訓練中隱藏層數量 ## 1129 設定target>瞭解角色>切分角色 ### 投影片 投影片>>關鍵字+圖 越早報分數越高:) learning rate 小> 訓練時間過長 learning rate 大> 訓練時間少,但容易錯果最佳解 ## 1216 優化模型 權重初始化 查看各出激活值 import numpy as np from tensorflow.keras.datasets import boston_housing from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout from tensorflow.keras.layers import BatchNormalization #from tensorflow.keras import optimizers #from tensorflow.keras.utils import to_categorical #from tensorflow.keras.callbacks import TensorBoard # new! (X_train, y_train), (X_test,y_test) = boston_housing.load_data() #規劃神經網絡架構 model = Sequential() model.add(Dense(32, activation='relu',input_dim=13)) model.add(BatchNormalization()) model.add(Dense(16, activation= 'relu')) model.add(BatchNormalization()) model.add(Dropout(0.2)) model.add(Dense(1, activation= 'linear')) model.summary() #模型翻譯 model.compile(loss= 'mean_squared_error', optimizer= 'RMSProp',metrics=['accuracy']) #注:由於神經網絡的初始權重參數是隨機設定的,參雜了隨機性,因此底下(或您重跑一次) 的結果不會與書中完全一樣,但模型的能力是相近的 model.fit(X_train,y_train, batch_size=8, epochs=32, verbose=1, validation_data=(X_test, y_test)) #原始程式碼 ''' pred=model.predict(np.reshape(X_test[42],[1,13])) #print(X_test[42]) print('Real:',y_test[42]) print('Pred: ',pred) ''' #翁老師 新增部分,預測所有測試資料 pred=model.predict(X_test) #顯示實際時與預測值 from pandas import DataFrame df=DataFrame({"Real":y_test , "Pred":pred.flatten()}) #pred.flatten()轉成1D資料 print (df) #翁老師計算rmse,mae inv_y=y_test inv_yhat=pred from math import sqrt from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error #calculate 均方根誤差 RMSE (root mean squared error) rmse = sqrt(mean_squared_error(inv_y, inv_yhat)) print('Test RMSE: %.3f' % rmse) # calculate 平均絕對誤差 (MAE ) (mean absolute error) mae = mean_absolute_error(inv_y,inv_yhat) print('Test Mae: %.3f' % mae) mse = mean_squared_error(inv_y, inv_yhat) print('Test MSE: %.3f' % mse) ### glorot normal distribution 標準常態分佈的變形 AVG= 0 標準差小於常態分佈的標準差 if梯度消失,需要重新調整參數

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully