Generalized tensor regression with covariates on multiple modes