How do I create padded batches in Tensorflow for tf.train.SequenceExample data using the DataSet API?

后端 未结 4 581
余生分开走
余生分开走 2020-12-31 02:53

For training an LSTM model in Tensorflow, I have structured my data into a tf.train.SequenceExample format and stored it i

4条回答
  •  青春惊慌失措
    2020-12-31 03:34

    Beware of not passing a tuple of tuples. That gives a very vague error of "cannot convert value None to type Nonetype".

    So correct: padded_shapes = ([None, None], [None])

    INCORRECT: padded_shapes = ((None, None), (None))

提交回复
热议问题