remove is _tensor_list
This commit is contained in:
Родитель
2c13ca6fa6
Коммит
584f3b1c8d
|
@ -1002,15 +1002,7 @@ def input_numpy(value, alias=None, dynamic_axis='', name=None):
|
|||
:class:`cntk.graph.ComputationNode`
|
||||
'''
|
||||
from .. import utils
|
||||
#TODO:
|
||||
# 1- is_tensor_list op =s false for our unit test data and examples,
|
||||
# though we intend to pass a list of tensors, the reason is that the method
|
||||
# checks for np.ndarray type. However, it got covered by is_tensor which op =s
|
||||
# true for those case though it should not
|
||||
# 2- Once those fixed, we should not skip the first dimension (value[0])
|
||||
# if value is tensor and not tensor list
|
||||
|
||||
if utils.is_tensor(value) or utils.is_tensor_list(value):
|
||||
if utils.is_tensor(value):
|
||||
value = np.asarray(value)
|
||||
if dynamic_axis:
|
||||
cntk_shape = value[0].shape[1:]
|
||||
|
|
|
@ -198,16 +198,6 @@ def is_tensor(data):
|
|||
|
||||
return True
|
||||
|
||||
|
||||
def is_tensor_list(data):
|
||||
'''
|
||||
Checks whether the data is a CNTK sequence, which is expressed in Python as
|
||||
a list of varying sized NumPy objects.
|
||||
'''
|
||||
is_list = isinstance(data, list)
|
||||
return is_list and len(data) > 0 and isinstance(data[0], np.ndarray)
|
||||
|
||||
|
||||
def get_temp_filename(directory=None):
|
||||
'''
|
||||
Create and return a temporary filename.
|
||||
|
|
Загрузка…
Ссылка в новой задаче