Fake example so the num input examples is a multiple of the batch size. When running eval/predict on the TPU, we need to pad the number of examples to be a multiple of the batch size, because the TPU requires a fixed batch size. The alternative is to drop the last batch, which is bad because i
| 151 | |
| 152 | |
| 153 | class PaddingInputExample(object): |
| 154 | """Fake example so the num input examples is a multiple of the batch size. |
| 155 | When running eval/predict on the TPU, we need to pad the number of examples |
| 156 | to be a multiple of the batch size, because the TPU requires a fixed batch |
| 157 | size. The alternative is to drop the last batch, which is bad because it means |
| 158 | the entire output data won't be generated. |
| 159 | We use this class instead of `None` because treating `None` as padding |
| 160 | battches could cause silent errors. |
| 161 | """ |
| 162 | |
| 163 | |
| 164 | class InputFeatures(object): |