W3cubDocs

/TensorFlow Python

Module: tf.contrib.model_pruning

Defined in tensorflow/contrib/model_pruning/__init__.py.

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(...)

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.

train(...): Wrapper around tf-slim's train function.

Other Members

__cached__

__loader__

__spec__

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/model_pruning