Example #1
0
    def run(self):

        if self.data_generation != 'dataset':
            dataset_dict_output = dp.generate_random_output_data(
                self.data_size,
                self.num_batches,
                self.mini_batch_size,
                round_targets=self.round_targets)
        else:
            raise NotImplementedError(
                f'data_generation {self.data_generation} not implemented')

        self.save(dataset_dict_output)
Example #2
0
                args.num_indices_per_lookup,
                args.num_indices_per_lookup_fixed,
                m_den,
                ln_emb,
                args.data_trace_file,
                args.data_trace_enable_padding,
            )
        else:
            sys.exit(
                "ERROR: --data-generation=" + args.data_generation + " is not supported"
            )

        # target data
        (nbatches, lT) = dp.generate_random_output_data(
            args.data_size,
            args.num_batches,
            args.mini_batch_size,
            round_targets=args.round_targets,
        )

    ### parse command line arguments ###
    m_spa = args.arch_sparse_feature_size
    num_fea = ln_emb.size + 1  # num sparse + num dense features
    m_den_out = ln_bot[ln_bot.size - 1]
    if args.arch_interaction_op == "dot":
        # approach 1: all
        # num_int = num_fea * num_fea + m_den_out
        # approach 2: unique
        if args.arch_interaction_itself:
            num_int = (num_fea * (num_fea + 1)) // 2 + m_den_out
        else:
            num_int = (num_fea * (num_fea - 1)) // 2 + m_den_out