Update modeling_minicpmv.py
Browse files297 unmodified lines298299300301302303304305306307308309310311312313297 unmodified linesfor place, tensor in enumerate(batch):to_add = []for pl in range(tensor.shape[1]):to_add.append(1)bound = 0for pl in range(tensor.shape[1], max_x):if bound == 0:bound = pl#print("here")tensor = torch.cat((vector_reshaped, tensor), dim=1)to_add.append(0)# tensor = tensor.to(self.device)if bound != 0:print(tensor[0,bound-1], " BOUND")297 unmodified lines298299300301302303304305306307308309310311312313314297 unmodified linesfor place, tensor in enumerate(batch):to_add = []for pl in range(0, max_x - tensor.shape[1]):to_add.append(0)bound = 0for pl in range(max_x - tensor.shape[1], max_x):if bound == 0:bound = pl#print("here")tensor = torch.cat((vector_reshaped, tensor), dim=1)to_add.append(1)# tensor = tensor.to(self.device)if bound != 0:print(tensor[0,bound-1], " BOUND")
modeling_minicpmv.py+5-4