def type_as()

in models/densenet_efficient_multi_gpu.py [0:0]


    def type_as(self, obj):
        new_sto = []
        if isinstance(obj, Variable):
            for sto in self.multi_storage:
                new_sto.append(sto.type(obj.data.storage().type()))
        elif isinstance(obj, torch._TensorBase):
            for sto in self.multi_storage:
                new_sto.append(sto.type(obj.storage().type()))
        else:
            for sto in self.multi_storage:
                new_sto.append(sto.type(obj.type()))
        self.multi_storage = new_sto