Giter Site home page Giter Site logo

abc's Introduction

abc

实践作业

项目说明:

在不使用封装好的LSTM 模型的情况下,实现单层和双层LSTM模型循环部分

LSTM.py为不使用封装好的LSTM的单层模型

doubleLSTMLM.py为不使用封装好的LSTM的双层模型

实现设计:

i_t = torch.sigmoid(x_t @ self.U_i + h_t0 @ self.V_i + self.b_i) # 输入门

g_t = torch.tanh(x_t @ self.U_c + h_t0 @ self.V_c + self.b_c) # 输入门

c_t = f_t * c_t0 + i_t * g_t # 记忆更新

f_t = torch.sigmoid(x_t @ self.U_f + h_t0 @ self.V_f + self.b_f) # 遗忘门

o_t = torch.sigmoid(x_t @ self.U_o + h_t0 @ self.V_o + self.b_o) # 输出门

h_t = o_t * torch.tanh(c_t) # 输出门

abc's People

Contributors

bashk51 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.