發表文章

目前顯示的是 1月, 2018的文章

建立 gnu tool chain

之前都是用建好的 tool chain, 完全不知道如何去建立一個 tool chain. 所以此文章就紀錄如何去建立特定平台的 tool chain. 補充一下: 這邊使用的 tool chain 也相當於 cross-compiler. 這邊以 linux, glibc, GNU GCC 和 GNU Binutils 作為 tool chain 的要件 參考 reference 與自己的想法所寫. 1. 概述 根據 [1] , tool chain 主要可分成compiler, assembler 與 linker. compiler: 編譯程式並產生 assemble code. 如 GNU compiler collection(gcc) assembler: 把 assemble code 轉換為特定平台上的 object code. 如 GNU binutils linker: 把 object code files 合併起來以及加入所需的library links 基於上述便產生出一個執行檔. 然而對於執行在 target Operating System 的程式來說還需要 C library, 如 glibc, newlib, etc. 而對 C Library 來說則又需要 kernel header files. 來確認 kernel 有提供那些功能. 了解構成要件後, 接著看一個 tool chain 要件之間需求關聯. 其由結果往前推導 [1] : 對於最後的編譯器(cross-compiler) 需要 C library, 並知道如何使用 APIs 與 crt(c runtime) files, 但是 編譯 C library 是需要一個 compiler 由於 1 & 2 彼此互相需要. 為了解決此問題. 就先編譯一個不需要 C library 的精簡編譯器 (stripped-down compiler). 相依關係又變為 編譯 C library 是需要一個 compiler, 但是 stripped-down compiler 需要 C li

Linux : ram disk

linux支援以memory做作為disk方法,來提升存取效率. 但也意味著資料會隨著電源關閉而消失. 以下為常見的方法列表與特性. tmpfs ramfs ramdisk Write out of limitation Error keep writing Error Fixed Size Y N Y Uses Swap Y N N Volatile Storage Y Y Y format before use N N Y 以下為各種ram disk的相關指令 tmpfs root@~# mkdir tmpfs root@~# mount -t tmpfs -o size=20m tmpfs tmpfs/ ramfs root@~# mkdir ramfs root@~# mount -t ramfs -o size=20m ramfs tmpfs/ ramdisk root@~# mkdir ramdisk root@~# mkfs.ext3 /dev/ram9 mke2fs 1.42.13 (17-May-2015) Discarding device blocks: done Creating filesystem with 65536 1k blocks and 16384 inodes Filesystem UUID: df58a293-4574-4e95-bde5-e60618eee94b Superblock backups stored on blocks: 8193, 24577, 40961, 57345 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accoun

deep learning 學習資源摘要

這邊紀錄關於deep learning知識與其中一個deep learning framework『tensorflow』. 與如何使用nvidia所開發的DNN SDK來與deep learning framework搭配. Deep Learning 背景 數據分析專題系列: 3 , 4 , 5 , 6 介紹了深度學習的起源, 以及途中所遭遇的『梯度消失』問題, 導致沒落一段時間之後, 又因為學者的努力而再度崛起. 教學 資料科學・機器・人 大推這網站, 一位網友翻譯深度學習的網站. 內容以易懂的方式講述深度學習, 從線性回歸的概念一路到神經網路和反向傳播. 並介紹兩個主要的神經網路模型. 卷積神經網路(Convolutional Neural Networks) 主要由這些layer構成 Convolutional Layer, Pooling Layer, and Fully-Connected Layer 遞歸神經網路(RNN:Recurrent Neural Networks)與長短期記憶模型(LSTM: Long Short-Term Memory) CS231n Convolutional Neural Networks for Visual Recognition 講解如何使用CNNs來做視覺辨識 TensorFlow(dnn framework) 這邊deep learning framework以熱門的tensortflow為主, 並列出一些網站所識做的範例作為學習. TensortFlow 安裝說明 TensorFlow Tutorial For Beginners 先介紹基本觀念, 再示範如何撰寫一個辨識交通號誌的例子. cv-tricks.com: Learn computer vision and artificial intelligence 從基本tensorflow用法、影像分辨範例以及如果把network model給import/export TensorFlow: How to freeze a model and serve it with a pyt