keras之preprocessing.sequence.pad_sequences

学自python函数—序列预处理pad_sequences()序列填充

1.基本功能

keras之preprocessing.sequence.pad_sequences_第1张图片

2.参数padding

padding: String, 'pre' or 'post': pad either before or after each sequence.

默认为取值为‘pre’。取值为'post'的填充效果如下:

keras之preprocessing.sequence.pad_sequences_第2张图片

你可能感兴趣的:(Python,深度学习)