21 lines
642 B
Python
21 lines
642 B
Python
from typing import Optional
|
|
|
|
class CNBlockConfig:
|
|
# Stores information listed at Section 3 of the ConvNeXt paper
|
|
def __init__(
|
|
self,
|
|
input_channels: int,
|
|
out_channels: Optional[int],
|
|
num_layers: int,
|
|
) -> None:
|
|
self.input_channels = input_channels
|
|
self.out_channels = out_channels
|
|
self.num_layers = num_layers
|
|
|
|
def __repr__(self) -> str:
|
|
s = self.__class__.__name__ + "("
|
|
s += "input_channels={input_channels}"
|
|
s += ", out_channels={out_channels}"
|
|
s += ", num_layers={num_layers}"
|
|
s += ")"
|
|
return s.format(**self.__dict__) |