Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(encoder): fix unused import and variable
  • Loading branch information
raccoonliukai committed Aug 2, 2019
1 parent fd57691 commit 2b21dc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gnes/encoder/image/onnx.py
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2b21dc5

Please sign in to comment.