Get value of tensor shape[i] preferring static value if available.
(tensor, i)
| 1225 | |
| 1226 | |
| 1227 | def _get_dim(tensor, i): |
| 1228 | """Get value of tensor shape[i] preferring static value if available.""" |
| 1229 | return tensor_shape.dimension_value( |
| 1230 | tensor.shape[i]) or array_ops.shape(tensor)[i] |
no test coverage detected