io-chess
UCI chess engine
Loading...
Searching...
No Matches
model.PieceBranch Class Reference
Inheritance diagram for model.PieceBranch:
Collaboration diagram for model.PieceBranch:

Public Member Functions

 __init__ (self, in_channels, mid_channels=16)
 forward (self, x)

Public Attributes

 conv0 = nn.Conv2d(in_channels, mid_channels, kernel_size=3, padding=1)
 conv1
 conv2 = nn.Conv2d(mid_channels, mid_channels, kernel_size=1)
 act = nn.ReLU(inplace=True)

Detailed Description

The deep, cacheable spatial logic for a single piece type.
Because these are computed BEFORE the mixer, they only cost CPU cycles
when the specific piece type moves.

Constructor & Destructor Documentation

◆ __init__()

model.PieceBranch.__init__ ( self,
in_channels,
mid_channels = 16 )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ forward()

model.PieceBranch.forward ( self,
x )

Member Data Documentation

◆ act

model.PieceBranch.act = nn.ReLU(inplace=True)

◆ conv0

model.PieceBranch.conv0 = nn.Conv2d(in_channels, mid_channels, kernel_size=3, padding=1)

◆ conv1

model.PieceBranch.conv1
Initial value:
= nn.Conv2d(
mid_channels,
mid_channels,
kernel_size=3,
padding=1,
groups=mid_channels,
)

◆ conv2

model.PieceBranch.conv2 = nn.Conv2d(mid_channels, mid_channels, kernel_size=1)

The documentation for this class was generated from the following file: