Shortcuts

PositionwiseFeedForward

class mmocr.models.common.PositionwiseFeedForward(d_in, d_hid, dropout=0.1, act_cfg={'type': 'Relu'})[source]

Two-layer feed-forward module.

Parameters
  • d_in (int) – The dimension of the input for feedforward network model.

  • d_hid (int) – The dimension of the feedforward network model.

  • dropout (float) – Dropout layer on feedforward output.

  • act_cfg (dict) – Activation cfg for feedforward module.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Read the Docs v: dev-1.x
Versions
latest
stable
v1.0.1
v1.0.0
0.x
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.