Solved by ptrblck in post #4 
              
              
                The error message might be confusing as the data type mismatch points to one of the used tensors. Based on the error it seems that the first tensor (input in this case) is used as the expected type.