josephjaspers / blackcat_tensors

Matrix-Vector Library Designed for Neural Network Construction. cuda (gpu) support, openmp (multithreaded cpu) support, partial support of BLAS, expression template based implementation PTX code generation identical to hand written kernels, and support for auto-differentiation
12 stars 4 forks source link

batch_size and samples size puzzle? #44

Closed xinsuinizhuan closed 4 years ago

xinsuinizhuan commented 4 years ago

图片 percept_MNIST function in mnist_test_recurrent example, batch_size==32, and samples=32X1024, but in my real data, the samples is not the batch_size's multiple, for example, my data size is 32X1024+31, so the last 31 record is not trained?

josephjaspers commented 4 years ago

Yes! That is correct, you could load the data into a cube that is a multiple of 32 and just leave the last column empty (zeros).

josephjaspers commented 4 years ago

Eventually I would like to add "training" functions so that you wouldn't need to write the training step your self. (Like how pytorch has a 'fit' method)