Module: tf.contrib.model_pruning
Stay organized with collections
Save and categorize content based on your preferences.
Model pruning implementation in tensorflow.
Classes
class MaskedBasicLSTMCell
: Basic LSTM recurrent network cell with pruning.
class MaskedLSTMCell
: LSTMCell with pruning.
class Pruning
Functions
apply_mask(...)
: Apply mask to a given weight tensor.
get_masked_weights(...)
get_masks(...)
get_pruning_hparams(...)
: Get a tf.HParams object with the default values for the hyperparameters.
get_thresholds(...)
get_weight_sparsity(...)
: Get sparsity of the weights.
get_weights(...)
graph_def_from_checkpoint(...)
: Converts checkpoint data to GraphDef.
masked_conv2d(...)
: Adds an 2D convolution followed by an optional batch_norm layer.
masked_convolution(...)
: Adds an 2D convolution followed by an optional batch_norm layer.
masked_fully_connected(...)
: Adds a sparse fully connected layer. The weight matrix is masked.
strip_pruning_vars_fn(...)
: Removes mask variable from the graph.
train(...)
: Wrapper around tf-slim's train function.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[]]