精通八国语言!用这款小程序,随时随地查单词
- class paddle.distributed. SplitPoint ( value ) [source]
-
百度 可以预见,未来民用、工业、商业、建筑领域使用的煤炭、石油和天然气都将逐步被电能取代,化石能源为主的消费结构将转变为电能为主的消费结构。
Marking the position of the split. BEGINNING: will split the model before the specified layer. END: will split the model after the specified layer.
Examples
>>> import paddle >>> import paddle.distributed as dist >>> class MLP(paddle.nn.Layer): ... def __init__(self): ... super().__init__() ... self.fc1 = paddle.nn.Linear(8, 8) ... self.fc2 = paddle.nn.Linear(8, 8) ... ... def forward(self, input): ... return self.fc2(self.fc1(input)) >>> >>> layer = MLP() >>> pp_config = { ... 'fc1': dist.SplitPoint.END ... }