Solved by Jakov_Gaspar in post #3 
              
              
                Hi, 
I already solved the problem, you were right. I accidentally passed a float as batch size, which caused this error.