tensorflow list[None]
今天看代码,有一句代码为sequences = nested.map( lambda lhs, rhs: tf.concat([lhs[None], rhs], 0), first_output, other_outputs)
有一个None,这在普通的数组运算中并不能用,只在tensorflow中使用,作用是增加数组维度,即在数组外边加一层[]。
但是这个在随机数组中并不能用:
今天看代码,有一句代码为sequences = nested.map( lambda lhs, rhs: tf.concat([lhs[None], rhs], 0), first_output, other_outputs)
有一个None,这在普通的数组运算中并不能用,只在tensorflow中使用,作用是增加数组维度,即在数组外边加一层[]。
但是这个在随机数组中并不能用: