DagsHub / streaming-client

MIT License
2 stars 0 forks source link

Corrected tensorflow batching #37

Closed jinensetpal closed 1 year ago

jinensetpal commented 1 year ago

Torch batches using: X = (batch, *size), y = (batch, *size), while tensorflow uses: z = [[batch_1], [batch_2]], where batch_n = (*size).

Torch does it correctly, so the behaviors are now unified. Instead of tensorflow batching being a single list with samples, it now contains the number of elements equal to the number of columns, and each column individually includes the batch's entire range of samples as part of the column tensor.

This notebook with different versions of the client can be used to evaluate both divergent and unified behaviors: https://colab.research.google.com/drive/1gmwLZWQJrjUFucxIchuTipuiu5oZ3oVy#scrollTo=rzg_NMQGfqHT