Skip to content

Conversation

@jacquesqiao
Copy link
Member

@jacquesqiao jacquesqiao commented Jun 28, 2017

fix #2564

check the input shape of dense_vector.

"The dimension of input cannot be greater than 3.")
self.__dim__ = reduce(lambda x, y: x * y, self.__shape__)
if len(self.__shape__) == 0:
self.__dim__ = 1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discuss with @qingqing01 , we think if user configure to use a dence_vector, then the data type should be a vector and shape should not be zero

@jacquesqiao jacquesqiao requested a review from qingqing01 June 28, 2017 02:35
"The dimension of input cannot be greater than 3.")
self.__dim__ = reduce(lambda x, y: x * y, self.__shape__)
if len(self.__shape__) == 0:
self.__dim__ = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DenseScanner must accept the data type dense_vector. So the dat in line 108 must be a list ([]) or numpy.array. See the input type doc.

The format of input data in issue is not correct.

Copy link
Contributor

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM.

@jacquesqiao jacquesqiao merged commit 1a0fdb9 into PaddlePaddle:develop Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

运行示例中的代码,得到错误:reduce() of empty sequence with no initial value

2 participants