Explorar o código

fix 'local variable 'im' referenced before assignment' for classification transform

FlyingQianMM %!s(int64=4) %!d(string=hai) anos
pai
achega
f573631ad8
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      paddlex/cv/transforms/cls_transforms.py

+ 1 - 0
paddlex/cv/transforms/cls_transforms.py

@@ -73,6 +73,7 @@ class Compose(ClsTransform):
                 raise Exception(
                     "im should be 3-dimension, but now is {}-dimensions".
                     format(len(im_file.shape)))
+            im = im_file
         else:
             try:
                 if input_channel == 3: