MCPcopy Create free account

hub / github.com/Tencent/PocketFlow / functions

Functions751 in github.com/Tencent/PocketFlow

↓ 138 callersMethodrun
Run the optimizer to obtain pruning ratios for all maskable variables. Returns: * var_names_n_prune_ratios: list of variable name & pruning r
learners/weight_sparsification/pr_optimizer.py:124
↓ 119 callersMethodappend
Append multiple transitions into the replay buffer. Args: * states: np.array of current state vectors * actions: np.array of action vecto
rl_agents/ddpg/replay_buffer.py:71
↓ 45 callersMethodis_primary_worker
Check whether is the primary worker of all nodes (global) or the current node (local). Args: * scope: check scope ('global' OR 'local')
learners/abstract_learner.py:133
↓ 38 callersFunctionop
(opfunc, **params)
utils/external/mobilenet.py:112
↓ 37 callersMethodcalc_loss
Calculate the distillation loss for the primary model's logits. Args: logits_pri: primary model's logits (shape: N x K) logits_dst: d
learners/distillation_helper.py:87
↓ 30 callersMethodsize
Get the number of workers at all nodes.
utils/multi_gpu_wrapper.py:47
↓ 28 callersMethodauto_barrier
Automatically insert a barrier for multi-GPU training, or pass for single-GPU training.
learners/abstract_learner.py:127
↓ 26 callersMethodlocal_rank
Get the rank of current worker at the current node.
utils/multi_gpu_wrapper.py:74
↓ 23 callersMethodrun
get the bit allocation strategy either with RL or not
learners/uniform_quantization/bit_optimizer.py:128
↓ 18 callersMethodbuild
Build iterator(s) for tf.data.Dataset() object. Args: * enbl_trn_val_split: whether to split into training & validation subsets Returns:
examples/fmnist_dataset.py:126
↓ 18 callersMethodrun
get the bit allocations either with RL or not
learners/nonuniform_quantization/bit_optimizer.py:135
↓ 16 callersMethodDistributedOptimizer
Get a distributed optimizer from the base optimizer.
utils/multi_gpu_wrapper.py:83
↓ 16 callersMethodcalc_logits
Calculate the distilled model's logits for given images. Args: * sess: TensorFlow session to restore model weights * images: input images
learners/distillation_helper.py:60
↓ 16 callersMethoddownload_model
Download remote model files and then uncompress. Note: All files in FLAGS.save_path will be removed and replaced by the pre-trained model.
learners/abstract_learner.py:105
↓ 15 callersMethodforward_train
Forward computation at training.
nets/lenet_at_cifar10.py:93
↓ 14 callersFunctionbatch_norm
Performs a batch normalization using a standard set of parameters.
utils/external/resnet_model.py:55
↓ 14 callersMethodforward_eval
Forward computation at evaluation.
nets/lenet_at_cifar10.py:98
↓ 14 callersFunctionis_primary_worker
Check whether is the primary worker of all nodes (global) or the current node (local). Args: * scope: check scope ('global' OR 'local') Return
utils/misc_utils.py:37
↓ 13 callersMethodbuild_dataset_train
Build the data subset for training, usually with data augmentation.
nets/lenet_at_cifar10.py:83
↓ 12 callersMethod__is_primary_worker
Weather it is the primary worker
learners/channel_pruning/learner.py:699
↓ 12 callersFunctionconv2d_fixed_padding
Strided 2-D convolution with explicit padding.
utils/external/resnet_model.py:92
↓ 12 callersMethoddump_n_eval
Dump the model's outputs to files and evaluate.
nets/vgg_at_pascalvoc.py:554
↓ 11 callersMethodbuild_dataset_eval
Build the data subset for evaluation, usually without data augmentation.
nets/lenet_at_cifar10.py:88
↓ 10 callersMethodbroadcast_global_variables
Get a TensorFlow operation to broadcast all the global variables.
utils/multi_gpu_wrapper.py:92
↓ 10 callersMethodtrain
Train the agent's actor & critic networks.
rl_agents/ddpg/agent.py:216
↓ 9 callersFunctionforward_module
(m, inputs, training=False)
utils/external/ssd_tensorflow/net/ssd_net.py:70
↓ 7 callersMethod__is_primary_worker
(cls)
learners/nonuniform_quantization/bit_optimizer.py:354
↓ 7 callersMethod__is_primary_worker
(cls)
learners/uniform_quantization/bit_optimizer.py:349
↓ 7 callersFunction_int64_feature
Wrapper for inserting int64 features into Example proto.
utils/external/ssd_tensorflow/dataset/convert_tfrecords.py:64
↓ 7 callersFunctioncreate_learner
Create the learner as specified by FLAGS.learner. Args: * sm_writer: TensorFlow's summary writer * model_helper: model helper with definitions
learners/learner_utils.py:33
↓ 7 callersMethodevaluate
Restore a model from the latest checkpoint files and then evaluate it.
learners/abstract_learner.py:101
↓ 7 callersMethodinit
Initialize the agent before all roll-outs. Actor & critic networks will be initialized and the replay buffer will be reset.
rl_agents/ddpg/agent.py:142
↓ 7 callersMethodsetup_lrn_rate
Setup the learning rate (and number of training iterations).
nets/lenet_at_cifar10.py:114
↓ 6 callersFunctioncalc_prune_ratio
Calculate the overall pruning ratio for the given list of variables. Args: * vars_list: list of variables Returns: * prune_ratio: overall pr
learners/channel_pruning_rmt/learner.py:97
↓ 6 callersMethodfinalize_rlout
Finalize the current roll-out (to update the baseline function). Args: * rewards: reward scalars (one per roll-out tick)
rl_agents/ddpg/agent.py:179
↓ 6 callersMethodinit_rlout
Initialize the agent before each roll-out. Parameter / action noise will be re-initialized for the upcoming roll-out.
rl_agents/ddpg/agent.py:159
↓ 6 callersMethodis_W1_prunable
if the op's input channels can be pruned
learners/channel_pruning/model_wrapper.py:343
↓ 6 callersMethodrecord
Append multiple transitions into the replay buffer. Args: * states: np.array of current state vectors * actions: np.array of action vecto
rl_agents/ddpg/agent.py:197
↓ 5 callersMethodaccuracy
Calculate the accuracy of pruned model
learners/channel_pruning/channel_pruner.py:414
↓ 5 callersMethodcenter2point
(self, center_y, center_x, height, width)
utils/external/ssd_tensorflow/utility/anchor_manipulator.py:120
↓ 5 callersMethodconv_block
(self, num_blocks, filters, kernel_size, strides, name, reuse=None)
utils/external/ssd_tensorflow/net/ssd_net.py:172
↓ 5 callersMethoddecode_jpeg
(self, image_data)
utils/external/ssd_tensorflow/dataset/convert_tfrecords.py:167
↓ 5 callersMethodget_all_anchors
(self)
utils/external/ssd_tensorflow/utility/anchor_manipulator.py:316
↓ 5 callersMethodget_conv_def
get the definition of an operation which contains the following information: `ksizes`: kernel sizes `padding`: paddings `h`: height
learners/channel_pruning/model_wrapper.py:202
↓ 5 callersMethodget_var_by_op
Get the weights of an operation Args: op: An operation Return: The weights of a operation
learners/channel_pruning/model_wrapper.py:147
↓ 5 callersMethodrank
Get the rank of current worker at all nodes.
utils/multi_gpu_wrapper.py:56
↓ 5 callersFunctionresnet_arg_scope
In Default, we do not use BN to train resnet, since batch_size is too small. So is_training is False and trainable is False in the batch_nor
utils/external/faster_rcnn_tensorflow/net/resnet_faster_rcnn.py:15
↓ 5 callersFunctionsetup_lrn_rate_piecewise_constant
Setup the learning rate with piecewise constant strategy. Args: * global_step: training iteration counter * batch_size: number of samples in ea
utils/lrn_rate_utils.py:23
↓ 4 callersMethod__build_quant_dict
Bind keys and values to dictionaries. Args: * keys: A list of op_names; * values: A Tensor with len(keys) elements; Returns: *
learners/nonuniform_quantization/learner.py:479
↓ 4 callersMethod__build_quant_dict
Bind keys and values to dictionaries. Args: * keys: A list of op_names * values: A Tensor with len(op_names) elements Returns:
learners/uniform_quantization/learner.py:431
↓ 4 callersMethod__save_model
Save the current model for training or evaluation. Args: * is_train: whether to save a model for training
learners/channel_pruning_gpu/learner.py:520
↓ 4 callersMethod__save_model
Save the current model for training or evaluation. Args: * is_train: whether to save a model for training
learners/channel_pruning_rmt/learner.py:844
↓ 4 callersFunction_fixed_padding
Pads the input along the spatial dimensions independently of input size. Pads the input such that if it was used in a convolution with 'VALID' padd
utils/external/conv_blocks.py:24
↓ 4 callersFunction_float_feature
Wrapper for inserting float features into Example proto.
utils/external/ssd_tensorflow/dataset/convert_tfrecords.py:71
↓ 4 callersFunctioncalc_prune_ratio
Calculate the overall pruning ratio for the given list of variables. Args: * vars_list: list of variables Returns: * prune_ratio: overall pr
learners/channel_pruning_gpu/learner.py:92
↓ 4 callersFunctioncalc_prune_ratio
Calculate the overall pruning ratio for the given list of variables. Args: * vars_list: list of variables Returns: * prune_ratio: overall pr
learners/weight_sparsification/learner.py:51
↓ 4 callersFunctioncalc_prune_ratio
Calculate the overall pruning ratio for the given list of variables. Args: * vars_list: list of variables Returns: * prune_ratio: overall pr
learners/discr_channel_pruning/learner.py:83
↓ 4 callersMethodcalc_reward
Calculate the reward. Args: * accuracy: classification accuracy after applying masks Returns: * reward: reward function's value
learners/weight_sparsification/rl_helper.py:89
↓ 4 callersMethodcompute_layer_flops
compute the flops of a certain convolution layer Args: operation: an convolution layer Return: The Flops
learners/channel_pruning/model_wrapper.py:256
↓ 4 callersMethodencode_all_anchors
(self, labels, bboxes, all_anchors, all_num_anchors_depth, all_num_anchors_spatial, debug=False)
utils/external/ssd_tensorflow/utility/anchor_manipulator.py:158
↓ 4 callersMethodforward
(self, inputs, training=False)
utils/external/ssd_tensorflow/net/ssd_net.py:118
↓ 4 callersFunctionget_vars_by_scope
Get list of variables within certain name scope. Args: * scope: name scope Returns: * vars_dict: dictionary of list of all, trainable, and m
learners/weight_sparsification/pr_optimizer.py:34
↓ 4 callersFunctionget_vars_by_scope
Get list of variables within certain name scope. Args: * scope: name scope Returns: * vars_dict: dictionary of list of all, trainable, and c
learners/channel_pruning_rmt/learner.py:54
↓ 4 callersFunctionmax_length_limitation
(length, length_limitation)
utils/external/faster_rcnn_tensorflow/preprocessing/faster_rcnn_preprocessing.py:14
↓ 4 callersFunctionprojection_shortcut
(inputs)
utils/external/resnet_model.py:343
↓ 4 callersMethodreset
Reset the current position.
rl_agents/unit_tests/move_to_target.py:50
↓ 4 callersMethodssd_conv_block
(self, filters, strides, name, padding='same', reuse=None)
utils/external/ssd_tensorflow/net/ssd_net.py:185
↓ 4 callersMethodstep
Move to the next position.
rl_agents/unit_tests/move_to_target.py:57
↓ 3 callersMethod__calc_grads_pruned
Calculate the mask-pruned gradients. Args: * grads_origin: list of original gradients Returns: * grads_pruned: list of mask-pruned g
learners/discr_channel_pruning/learner.py:441
↓ 3 callersMethod__finetune_pruned_model
(self, path=None, finetune=False)
learners/channel_pruning/learner.py:581
↓ 3 callersMethod__inv_scale
Inversed linear scale function Args: * w: A Tensor (weights or activations), origin shape if not use_buckets else [bucket_size, buck
learners/nonuniform_quantization/utils.py:420
↓ 3 callersMethod__make_iterator
Make an iterator from tf.data.Dataset. Args: * dataset: tf.data.Dataset object Returns: * iterator: iterator for the dataset
datasets/abstract_dataset.py:96
↓ 3 callersMethod__make_iterator
Make an iterator from tf.data.Dataset. Args: * dataset: tf.data.Dataset object Returns: * iterator: iterator for the dataset
examples/fmnist_dataset.py:151
↓ 3 callersMethod__save_model
Save the current model for training or evaluation. Args: * is_train: whether to save a model for training
learners/uniform_quantization_tf/learner.py:319
↓ 3 callersMethod__save_model
Save the current model for training or evaluation. Args: * is_train: whether to save a model for training
learners/discr_channel_pruning/learner.py:531
↓ 3 callersMethod__save_model
Save the model to checkpoint files for training or evaluation. Args: * is_train: whether to save a model for training
learners/full_precision/learner.py:180
↓ 3 callersMethod__scale
linear scale function Args: * w: A Tensor (weights or activation output), the shape is [bucket_size, bucekt_num] if use_bucket else
learners/nonuniform_quantization/utils.py:388
↓ 3 callersFunction_bytes_feature
Wrapper for inserting bytes features into Example proto.
utils/external/ssd_tensorflow/dataset/convert_tfrecords.py:84
↓ 3 callersFunction_smooth_l1_loss_base
:param bbox_pred: [-1, 4] in RPN. [-1, cls_num+1, 4] in Fast-rcnn :param bbox_targets: shape is same as bbox_pred :param sigma: :ret
utils/external/faster_rcnn_tensorflow/utility/loss_utils.py:13
↓ 3 callersMethodcall
(self, inputs)
utils/external/ssd_tensorflow/net/ssd_net.py:64
↓ 3 callersMethodcompress
Compress the model by channel pruning Args: action: preserving ratio
learners/channel_pruning/channel_pruner.py:727
↓ 3 callersMethoddecode_all_anchors
(self, pred_location, num_anchors_per_layer)
utils/external/ssd_tensorflow/utility/anchor_manipulator.py:210
↓ 3 callersFunctiondenormalize
De-normalize with the given running averages of mean value & standard deviation. Args: * smpl_mat: normalized sample matrix * rms: running aver
rl_agents/ddpg/agent.py:53
↓ 3 callersFunctiondense_block
A block of densely connected layers. Args: * inputs: input tensor to the block * units: number of neurons in each layer Returns: * inputs:
rl_agents/ddpg/actor_critic.py:30
↓ 3 callersFunctiondo_python_eval
(dataset_path, pred_path, use_07=True)
utils/external/ssd_tensorflow/voc_eval.py:50
↓ 3 callersFunctiondraw_boxes_with_label_and_scores
(img_array, boxes, labels, scores)
utils/external/faster_rcnn_tensorflow/utility/draw_box_in_img.py:99
↓ 3 callersMethodevaluate
Restore a model from the latest checkpoint files and then evaluate it.
learners/channel_pruning_gpu/learner.py:184
↓ 3 callersMethodevaluate
Restore a model from the latest checkpoint files and then evaluate it.
learners/channel_pruning_rmt/learner.py:195
↓ 3 callersMethodextract_features
Extract feature-maps and do sampling for some convolutions with given images Args: names: convolution operation names init_fn: i
learners/channel_pruning/channel_pruner.py:263
↓ 3 callersMethodfinallayer
whether final layer reached
learners/channel_pruning/channel_pruner.py:642
↓ 3 callersFunctionforward_fn
Forward pass function. Args: * inputs: inputs to the network's forward pass * data_format: data format ('channels_last' OR 'channels_first')
nets/lenet_at_cifar10.py:34
↓ 3 callersMethodget_input_by_op
Get the input of an operation Args: op: An operation Return: The input of a operation
learners/channel_pruning/model_wrapper.py:124
↓ 3 callersMethodget_operations_by_type
Get all the operations of a certain type within the model graph Args: otype: The type of returned operations Return: operation
learners/channel_pruning/model_wrapper.py:60
↓ 3 callersFunctionget_ops_by_scope_n_pattern
Get list of operations within certain name scope and also matches the pattern. Args: * scope: name scope * pattern: name pattern to be matched
learners/channel_pruning_gpu/learner.py:74
↓ 3 callersFunctionget_ops_by_scope_n_pattern
Get list of operations within certain name scope and also matches the pattern. Args: * scope: name scope * pattern: name pattern to be matched
learners/discr_channel_pruning/learner.py:65
↓ 3 callersFunctionget_ops_by_scope_n_pattern
Get list of operations within certain name scope and also matches the pattern. Args: * scope: name scope * pattern: name pattern to be matched
learners/channel_pruning_rmt/learner.py:79
↓ 3 callersMethodget_outname_by_opname
get output name by operation name
learners/channel_pruning/model_wrapper.py:231
↓ 3 callersFunctionget_vars_by_scope
Get list of variables within certain name scope. Args: * scope: name scope Returns: * vars_dict: dictionary of list of all and trainable var
learners/uniform_quantization_tf/learner.py:48
↓ 3 callersFunctionget_vars_by_scope
Get list of variables within certain name scope. Args: * scope: name scope Returns: * vars_dict: dictionary of list of all, trainable, and m
learners/channel_pruning_gpu/learner.py:50
↓ 3 callersFunctionget_vars_by_scope
Get list of variables within certain name scope. Args: * scope: name scope Returns: * vars_dict: dictionary of list of all, trainable, and m
learners/discr_channel_pruning/learner.py:41
next →1–100 of 751, ranked by callers