This commit is contained in:
jeanfad 2016-05-31 22:26:52 +02:00
Родитель 2c13ca6fa6
Коммит 584f3b1c8d
2 изменённых файлов: 2 добавлений и 20 удалений

Просмотреть файл

@ -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.