tensorlayer / TensorLayer

Deep Learning and Reinforcement Learning Library for Scientists and Engineers
http://tensorlayerx.com
Other
7.33k stars 1.61k forks source link

Fix inconsistent output in zoom_multi #1115

Closed dalonsoa closed 3 years ago

dalonsoa commented 3 years ago

Checklist

Motivation and Context

Preprocessing tools of the type *_multi (eg. elastic_transform_multi, swirl_multi, etc) accept a numpy array as input and return a numpy array as output. On the contrary, zoom_multi accepts an array as input but returns a list of arrays, which seems inconsistent with the other functions in addition to disagree with the docstrings, which says that the return value is a numpy array.

Description

I just use np.asarray to transform the list to an array, as it is done in the other *_multi functions.