File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -705,7 +705,9 @@ def forward(self, img):
705
705
706
706
fill = self .fill
707
707
if isinstance (img , Tensor ):
708
- if isinstance (fill , (int , float )):
708
+ if fill is None :
709
+ fill = [.0 ] * F ._get_image_num_channels (img )
710
+ elif isinstance (fill , (int , float )):
709
711
fill = [float (fill )] * F ._get_image_num_channels (img )
710
712
else :
711
713
fill = [float (f ) for f in fill ]
@@ -1390,7 +1392,9 @@ def forward(self, img):
1390
1392
"""
1391
1393
fill = self .fill
1392
1394
if isinstance (img , Tensor ):
1393
- if isinstance (fill , (int , float )):
1395
+ if fill is None :
1396
+ fill = [.0 ] * F ._get_image_num_channels (img )
1397
+ elif isinstance (fill , (int , float )):
1394
1398
fill = [float (fill )] * F ._get_image_num_channels (img )
1395
1399
else :
1396
1400
fill = [float (f ) for f in fill ]
You can’t perform that action at this time.
0 commit comments