Giter Club home page Giter Club logo

sopc's Introduction

HW1

Code : matrix.c conv2D.c attention.c

  1. matrix.c請以 C 程式實現矩陣相乘的功能,完成 matrix_mul(A, B)的函數,回傳 A,B 矩陣相乘的結果。A 的矩陣大小為 MxW, B 的矩陣大小為 WxN。
  2. conv2D.c利用上述矩陣相乘函數實現一個二維捲積函數 conv2D(C, D),C 的矩陣大小 為 LxL, D矩陣為捲積核心,其大小為 KxK。
  3. attention.c利用上述矩陣相乘函數實現一個self-attention的函數 attention(IN,Wq,Wk,Wv ),IN 的矩陣大小為 S1xS2, Wq 的矩陣大小為 S2xS3, Wk 的矩陣大小為 S2xS3, Wv 的矩陣大小為 S2xS4。

Note: 上述維度資訊參數(M, W, N, K, S1, S2, S3, S4)請以#define 方式定義,以 方便後續更改實際參數值

self-attention示意圖

alt text alt text

sopc's People

Contributors

anntaiwan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.