view(): argument 'size' (position 1) must be tuple of ints, not Tensor
pytorch的view函数参数不能是tensor,解决方法是,把参数改为tensor.shape 或者size()
grid_y = torch.linspace(0, self.g_dim - 1, self.g_dim).repeat(self.g_dim, 1).t().repeat(bs * self.num_anchors, 1, 1).view(x).type(self.FloatTensor)