Skip to content
Permalink
Browse files

fix(encoder): fix unused import and variable

  • Loading branch information...
raccoonliukai committed Aug 2, 2019
1 parent fd57691 commit 2b21dc5ab1e40cd69c2011c4c0d03b15f69559c6
Showing with 2 additions and 3 deletions.
  1. +2 −3 gnes/encoder/image/onnx.py
@@ -13,8 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
from typing import List, Callable
from typing import List

import numpy as np

@@ -54,7 +53,7 @@ def encode(self, img: List['np.ndarray'], *args, **kwargs) -> np.ndarray:
pad_batch = 0
if len(img) != self.input_shape[0]:
pad_batch = self.input_shape[0] - len(img)
for i in range(pad_batch):
for _ in range(pad_batch):
img.append(np.zeros_like(img[0]))

img_ = np.array(img, dtype=np.float32).transpose(0, 3, 1, 2)

0 comments on commit 2b21dc5

Please sign in to comment.
You can’t perform that action at this time.