-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
torch.nn.BatchNorm1d转换时会丢失track_running_stats,demo如下。
paconvert版本:3.0.1
原Torch代码:
import torch
in_channels = 10
eps = 1e-5
momentum = 0.1
affine = True
track_running_stats = True
net = torch.nn.BatchNorm1d(in_channels, eps, momentum, affine,
track_running_stats)
转换后的Paddle代码:
import paddle
in_channels = 10
eps = 1e-05
momentum = 0.1
affine = True
track_running_stats = True
net = paddle.nn.BatchNorm1D(
num_features=in_channels,
epsilon=eps,
weight_attr=affine,
bias_attr=affine,
momentum=1 - momentum,
)
从转换结果看,转换后的代码丢失了track_running_stats参数。
Metadata
Metadata
Assignees
Labels
No labels