data parsing row major
This commit is contained in:
Родитель
3c17acba63
Коммит
9466ee1ecd
|
@ -571,7 +571,7 @@ class LocalExecutionContext(AbstractContext):
|
|||
continue
|
||||
else:
|
||||
data = LocalExecutionContext._sanitized_asarray(
|
||||
data).reshape(shape, order='F')
|
||||
data).reshape(shape, order='C')
|
||||
|
||||
tensor_seq.append(data)
|
||||
|
||||
|
@ -755,12 +755,12 @@ class LocalExecutionContext(AbstractContext):
|
|||
action_name = action_name)
|
||||
|
||||
out_name = os.path.join(self.directory, CNTK_OUTPUT_FILENAME + '.')
|
||||
node.tag = orig_node_tag
|
||||
if backward_pass:
|
||||
n = input_name.name if isinstance(
|
||||
input_name, ComputationNode) else input_name
|
||||
n = input_name.name if isinstance(input_name, ComputationNode)\
|
||||
else input_name
|
||||
out_name += n + '.grad'
|
||||
else:
|
||||
node.tag = orig_node_tag
|
||||
else:
|
||||
out_name += node.name
|
||||
|
||||
result_content = open(out_name).read()
|
||||
|
|
|
@ -959,8 +959,6 @@ def input_numpy(value, alias=None, dynamic_axis='', name=None):
|
|||
if len(cntk_shape) == 0:
|
||||
raise ValueError('value should be an array of input samples')
|
||||
|
||||
# cntk uses column major, thus we reverse the shape
|
||||
cntk_shape = tuple(reversed(cntk_shape))
|
||||
node = input(cntk_shape, dynamic_axis=dynamic_axis, name=name)
|
||||
from ..reader import LazyInputReader
|
||||
node.reader = LazyInputReader(
|
||||
|
|
|
@ -38,7 +38,8 @@ def cntk_to_numpy_shape(shape):
|
|||
if not shape:
|
||||
shape = (1,)
|
||||
|
||||
return shape
|
||||
# cntk uses column major, thus we reverse the axes
|
||||
return tuple(reversed(shape))
|
||||
|
||||
|
||||
def aggregate_readers(readers):
|
||||
|
|
Загрузка…
Ссылка в новой задаче