Skip to content

Make Module:backward() final #25

@jason-dai

Description

@jason-dai
Contributor

We should make Module:backward final, and overload the updategradInput and accGradParameters methods in its subclasses instead.

Activity

added this to the 0.1 release milestone on Jan 9, 2017
removed this from the 0.1 release milestone on Jan 9, 2017
zhichao-li

zhichao-li commented on Jun 7, 2017

@zhichao-li
Contributor

A similar one need to be final: #966

yiheng

yiheng commented on Jun 8, 2017

@yiheng
Contributor

Forward and backward should be final for all non-container layers. The non-container layer should only override updateOutput(), updateGradInput() and accGrad(). Some common logic(e.g. bypass the layer/freeze the parameter) should be put into the forward/backward method and not be changed by the non-container layers.

Forward/Backward should be overridden in container layers. In container forward/backward method, the submodules should always call forward/backward method of the submodule.

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @yiheng@jason-dai@zhichao-li

        Issue actions

          Make Module:backward() final · Issue #25 · intel/ipex-llm