From b2f9ea8637b567287c8f626d1d30e91413b73760 Mon Sep 17 00:00:00 2001 From: Colombo Date: Sat, 3 Oct 2020 22:38:29 +0400 Subject: [PATCH] fix integer dimensions in model initialization --- facelib/FANExtractor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/facelib/FANExtractor.py b/facelib/FANExtractor.py index 5676fcc..e71f393 100644 --- a/facelib/FANExtractor.py +++ b/facelib/FANExtractor.py @@ -28,13 +28,13 @@ class FANExtractor(object): self.out_planes = out_planes self.bn1 = nn.BatchNorm2D(in_planes) - self.conv1 = nn.Conv2D (in_planes, out_planes/2, kernel_size=3, strides=1, padding='SAME', use_bias=False ) + self.conv1 = nn.Conv2D (in_planes, out_planes//2, kernel_size=3, strides=1, padding='SAME', use_bias=False ) self.bn2 = nn.BatchNorm2D(out_planes//2) - self.conv2 = nn.Conv2D (out_planes/2, out_planes/4, kernel_size=3, strides=1, padding='SAME', use_bias=False ) + self.conv2 = nn.Conv2D (out_planes//2, out_planes//4, kernel_size=3, strides=1, padding='SAME', use_bias=False ) self.bn3 = nn.BatchNorm2D(out_planes//4) - self.conv3 = nn.Conv2D (out_planes/4, out_planes/4, kernel_size=3, strides=1, padding='SAME', use_bias=False ) + self.conv3 = nn.Conv2D (out_planes//4, out_planes//4, kernel_size=3, strides=1, padding='SAME', use_bias=False ) if self.in_planes != self.out_planes: self.down_bn1 = nn.BatchNorm2D(in_planes)