<p dir="auto">Using bidirectional_dynamic_rnn throws the "ValueError: None values not supported" when you are not specifying the sequence lengths. The error comes from the reverse step, the operator used to reverse the input sequences requires the sequence lengths to be specified. Maybe this should be a required parameter or alternatively generate the lengths array when the default 'None' is used.</p>
<p dir="auto">(tensorflow 1.0.0)</p>
<p dir="auto">Qualifier: very new to TF, so I may be missing something very obvious.  If so, apologies.</p>
<p dir="auto">DOCUMENTATION:</p>
<p dir="auto">Is a little conflicting:</p>
<p dir="auto">"sequence_length: An int32/int64 vector, size [batch_size], containing the actual lengths for each of the sequences." &lt;-- implies sequence_length is required</p>
<p dir="auto">However...</p>
<p dir="auto">"The initial state for both directions is zero by default (but can be set optionally) and no intermediate states are ever returned -- the network is fully unrolled for the given (passed in) length(s) of the sequence(s) or completely unrolled if length(s) is not given." &lt;-- implies sequence_length is not required.</p>
<p dir="auto">FUNCTIONALITY"</p>
<p dir="auto">Base on the function itself ("<em>dynamic</em>"), I would assume that allowing sequence_length=None is intended (although, in either case, the documentation should be straightened out).</p>
<p dir="auto">Assuming we do want to allow seq_length=None, the offending portion within bidirectional_dynamic_rnn would appear to be:</p>
<p dir="auto">inputs_reverse = array_ops.reverse_sequence(...seq_lengths=sequence_length...)</p>
<p dir="auto">reverse_sequence appears to require seq_lengths != None</p>
<p dir="auto">Oddly enough, bidirectional_rnn may(?) be robust to this problem, as it uses _reverse_seq, which handles lengths=None.</p>
<p dir="auto">That said, I haven't tested this extensively, as I'm of course not 100% sure I've interpreted the above correctly and as to what the intended functionality is.</p>
<p dir="auto">Given guidance, I could take a stab at a pull request to address the above.  Or maybe this is a quick fix/known issue (or non-issue...).</p>