tf.reshape(x,[:,none,none,:])
时间: 2023-10-28 11:05:11 浏览: 128
matlab 7.x 程序设计语言 (第二版)
This code will reshape the tensor x to have an additional two dimensions at the second and third axis positions. The resulting tensor will have a shape of (original_shape[0], 1, 1, original_shape[1]).
For example, if x had a shape of (2, 3), the resulting tensor would have a shape of (2, 1, 1, 3).
The "none" keyword is used in Python to represent a placeholder for a new dimension in a reshape operation.
阅读全文