跳到主要內容

發表文章

[Development] Deep Learning over Python 深度學習基於 Python 3/3

  用 Python 練習實作深度學習,主要包含 Tensorflow 以及 SVM,著重於實作範例,未深入涉及各 DL 演算法模型原理及其數學。 大綱 [Development] Deep Learning over Python 深度學習基於 Python 1/3 Basic Tools: 基於 python- numpy, matplotlib, scipy, Pandas [Development] Deep Learning over Python 深度學習基於 Python 2/3 Keras (基於 Tensorflow)  Tensorflow [Development] Deep Learning over Python 深度學習基於 Python 3/3 Support Vector Machine (SVM) 萬用分類機 Reinforcement Learning (RL) 強化學習 Reference: 本篇基於  Udemy 課程 "吳佳諺- Python 深度學習"  為架構出發衍生,其他引用資料個別在段落中標示 Support Vector Machine (SVM) 萬用分類機   SVM 就是用統計上風險最小化的方法,來產生一個分類的超平面 (hyperplane),也就是找到一個決策邊界 (decision boundary),該邊界可以讓「兩類」之間的邊界 margins 最大化。   SVM 是一個二元分類器,也就是只能做非黑即白的分類判斷。   如果資料只有二維,如在二維直線座標系中標記了許多點,若這些點概念上可以被分成兩類,我們就可以透過迴歸分析的幫助,找出一條線來最適當的把這兩類的點切分開來,這條線如果是直線,那就是一個一元一次方程式,如果是曲線那當然就是二次三次或更高。   而該怎麼找出最佳的一個切割面?SVM 的提議也很簡單,他假設如果存在一個 hyperplane,這個 hyperplane 距離所有 A/B 類節點的距離總和最長,那他就是一個最佳的分割面,這裡的距離的概念也就是 margin。簡單理解就是,處在兩個點的「最中間」位置的那條線就是這兩點的最佳切割線。  ...

[Development] Deep Learning over Python 深度學習基於 Python 2/3

  用 Python 練習實作深度學習,主要包含 Tensorflow 以及 SVM,著重於實作範例,未深入涉及各 DL 演算法模型原理及其數學。 大綱 [Development] Deep Learning over 深度學習基於 Python Python 1/3 Basic Tools: 基於 python- numpy, matplotlib, scipy, Pandas [ Development] Deep Learning over Python  深度學習基於 Python  2/3 Keras (基於 Tensorflow) , 使用 Sequential 模型(範例 實作 "MINST 手寫辨識") CNN (Convolutional Neural Networks) 卷積神經網路 (範例 實作 "MINST 手寫辨識") RNN (Recurrent Neural Networks) 遞歸(迴)神經網路 (範例 實作 "IMPb 評論辨識") Tensorflow 基礎應用 NN 基本作用原理 CNN (Convolutional Neural Networks) 卷積神經網路 (範例 實作 "MINST 手寫辨識") [Development] Deep Learning over Python 深度學習基於 Python 3/3 Support Vector Machine (SVM) 強化學習 Reinforcement Learning (RL) Reference: 本篇基於 Udemy 課程 "吳佳諺- Python 深度學習" 為架構出發衍生,其他引用資料個別在段落中標示 Keras Keras 是一个用 Python 编写的高级神经网络 API,它能够以  TensorFlow ,  CNTK , 或者  Theano  作为后端运行 Keras 的核心数据结构是  model ,一种组织网络层的方式。最简单的模型是  Sequential 顺序模型 ,它由多个网络层线性堆叠。对于更复杂的结构,你应该使用  Keras 函数式 API ,它允许构建任意的...

[Development] Deep Learning over Python 深度學習基於 Python 1/3

  用 Python 練習實作深度學習,主要包含 Tensorflow 以及 SVM,著重於實作範例,未深入涉及各 DL 演算法模型原理及其數學。 大綱 [Development] Deep Learning over Python  深度學習基於 Python  1/3 Basic Tools: 基於 python- numpy, matplotlib, scipy, Pandas [Development] Deep Learning over Python 深度學習基於 Python 2/3 Keras (基於 Tensorflow)  Tensorflow [Development] Deep Learning over Python 深度學習基於 Python 3/3 Support Vector Machine (SVM) 強化學習 Reinforcement Learning (RL) Reference: 本篇基於  Udemy 課程 "吳佳諺- Python 深度學習"  為架構出發衍生,其他引用資料個別在段落中標示 Basic Tools numpy import numpy as np from scipy import linalg   # linear algebra import matplotlib.pyplot as plt myarray = np.array([[1, 2, 3], [4, 5, 6]]) print('myarray:', myarray) myarray_allzero = np.zeros((3, 5), dtype = np.int16) print('myarray_allzero:', myarray_allzero) myarray_2 = np.arange(15, dtype = np.int64) print('myarray_2:', myarray_2) myarray_2 = myarray_2.reshape((3, 5)) print('myarray_2 reshape:', myarray_2) myarray: [[1 2 3...

[Coding] Compiler

Something about compiling. #compiler #link #gcc Reference PTT LinuxDev, 作者: cole945 (躂躂..) 看板: LinuxDev, 標題: [心得] 用gcc 自製Library, 時間: Sun Nov 5 04:15:45 2006 Static Link Compile 時將 library 加入程式碼,執行快但佔空間,code size 和 mem 使用都比較多 Compile source codes to generate object files $ gcc -c file1.c file2.c file3.c -c 編出 object 檔 Create a static library named libmylib.a $ ar rcs lib mylib .a file1.o file2.o file3.o 把一堆 object 檔用 ar(archiver) 包裝集合起來,檔名以`.a’ 結尾 Using a Static Library to generate a executable files $ gcc -o main main.c -L. -l mylib -L: the directory of the library. 可以指定多次 -LDIR -l: the name of the library (注意 藍色 部分是 match 的) Dynamic Link Compile 時不將 library 加入程式碼,執行程式的時後再將 library 載入程式碼,若有多個程式共用同一個 library,只需載一個 library 進 memory Compile source code $ gcc -c -fPIC file1.c file2.c file3.c -fPIC 表示要編成 position-independent code,這樣不同 process 載入 shared library 時,library 的程式和資料才能放到記憶體不同位置。-fPIC 較通用於不同平台,但產生的 code 較大,而且編譯速度較慢 Create a shared library...

[Coding] Python

comment:   single line: #   multiple line: ''' ... ''' encode: # -*- coding: utf-8 -*- math operation: 先乘除後加減 5**2: 5 的平方 5**0.5: 平方根 log(8, 2) => 3 Data type None 就是 C 的 null 變數型態不需宣告 only int, float, string string 'mystring' mychar = string[0] #mychar is still string type string[2:5] s[2] == 'a' s += "append string" array/linked-list/stack (implemented by array)  fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] len(fruits) fruits.count('apple') => 2 fruits.index('banana') => 3 fruits.index('banana', 4) => 6 fruits.remove('banana') del fruits[-1] fruits.insert(3, 'grape') fruits.reverse() fruits.append('grape') fruits += ['orange', 'peach'] fruits.sort() fruits.pop() => 'banana' nD 2D array 取值是用 a[i][j],不是用 a[i, j],後者回傳的是 tupl...

Let's Move On

今天決定要建個部落格 身為資工系的學生, 又那麼愛做筆記 XD 卻到今天才想做這件事似乎有點落漆 還沒明確知道想用來記錄些什麼, 有可能只是與程式相關的東西, 也有可能會很雜 但也很有可能過了一年什麼屁都沒有, 到時候也可以拿出來嘲笑自己一下自我檢討一番 Decide creating the blog today. It seems abnormal for a computer science student to do this so late. After all, I like taking note a lots... Still not sure about what am gonna write here. Maybe all about programming. Maybe it will be really mixed. Nevertheless... very likely that it will still be empty after a year... Then I can open it and piss myself. 迅速 Google 了一下該用哪個平台, 只想找個簡單好用的 外貌先決下 wordpress 和 blogger 脫穎而出, 進一步看了一下覺得並沒有複雜架站的需求所以最後選了 blogger