def print_weights()

in benchmarks/dlrm/ootb/dlrm_s_pytorch.py [0:0]


    def print_weights(self):
        if self.use_fbgemm_gpu and len(self.fbgemm_emb_l):
            ntables_l = [
                len(e.fbgemm_gpu_emb_bag.embedding_specs) for e in self.fbgemm_emb_l
            ]
            for j in range(ntables_l[0] + 1):
                for k, e in enumerate(self.fbgemm_emb_l):
                    if j < ntables_l[k]:
                        print(
                            e.fbgemm_gpu_emb_bag.split_embedding_weights()[j]
                            .detach()
                            .cpu()
                            .numpy()
                        )
        elif self.quantize_bits != 32:
            for e in self.emb_l_q:
                print(e.data.detach().cpu().numpy())
        else:  # if self.emb_l:
            for param in self.emb_l.parameters():
                print(param.detach().cpu().numpy())
        if isinstance(self.v_W_l, nn.ParameterList):
            for param in self.v_W_l.parameters():
                print(param.detach().cpu().numpy())
        for param in self.bot_l.parameters():
            print(param.detach().cpu().numpy())
        for param in self.top_l.parameters():
            print(param.detach().cpu().numpy())