(dense_shape)
| 4352 | |
| 4353 | # Return a single value for 1-D dense shape, but a tuple for other shapes. |
| 4354 | def generate_index(dense_shape): |
| 4355 | if len(dense_shape) == 1: |
| 4356 | return np.random.randint(dense_shape[0]) |
| 4357 | else: |
| 4358 | index = [] |
| 4359 | for shape in dense_shape: |
| 4360 | index.append(np.random.randint(shape)) |
| 4361 | return tuple(index) |
| 4362 | |
| 4363 | def build_graph(parameters): |
| 4364 | """Build the sparse_to_dense op testing graph.""" |
no test coverage detected