(_, outputs)
| 31 | # In order to produce truly random lengths and indices, we will embed a |
| 32 | # Python operator in the net to generate them. |
| 33 | def f(_, outputs): |
| 34 | lengths = np.random.randint( |
| 35 | int(average_len * 0.75), int(average_len * 1.25), batch_size |
| 36 | ).astype(np.int32) |
| 37 | indices = np.random.randint(0, categorical_limit, np.sum(lengths)).astype( |
| 38 | np.int64 |
| 39 | ) |
| 40 | outputs[0].feed(indices) |
| 41 | |
| 42 | workspace.FeedBlob("X", data) |
| 43 | workspace.FeedBlob("huge_blob", np.random.randn(l3_cache_size).astype(np.float32)) |
no test coverage detected