def assert_shape(variable, shape):
"""Assert that a TensorFlow Variable has a particular shape.
Args:
variable: TF Variable
shape: a TensorShape, Dimension or tuple
"""
variable.get_shape().assert_is_compatible_with(shape)
评论列表
文章目录