(extra=False)
| 23 | return trX, teX, trY, teY |
| 24 | |
| 25 | def svhn_with_valid_set(extra=False): |
| 26 | if extra: |
| 27 | trX, exX, teX, trY, exY, teY = svhn(extra=extra) |
| 28 | else: |
| 29 | trX, teX, trY, teY = svhn(extra=extra) |
| 30 | trX, trY = shuffle(trX, trY) |
| 31 | vaX = trX[:10000] |
| 32 | vaY = trY[:10000] |
| 33 | trX = trX[10000:] |
| 34 | trY = trY[10000:] |
| 35 | if extra: |
| 36 | trS = np.asarray([1 for _ in range(len(trY))] + [0 for _ in range(len(exY))]) |
| 37 | trX = np.concatenate([trX, exX], axis=0) |
| 38 | trY = np.concatenate([trY, exY], axis=0) |
| 39 | trX, trY, trS = shuffle(trX, trY, trS) |
| 40 | if extra: |
| 41 | return trX, vaX, teX, trY, vaY, teY, trS |
| 42 | else: |
| 43 | return trX, vaX, teX, trY, vaY, teY |
no test coverage detected