tf.contrib.framework.load_linear_multiclass_bias_initializer( ckpt_path, bias_tensor_name, new_class_vocab_size, old_class_vocab_file, new_class_vocab_file, num_class_oov_buckets=0, initializer=None, max_rows_in_memory=-1 )
Defined in tensorflow/contrib/framework/python/ops/checkpoint_ops.py
.
Loads pre-trained multi-class biases for linear models from checkpoint.
Wrapper around load_and_remap_matrix_initializer()
specialized for loading multi-class bias and remapping according to the provided vocab files. See docs for load_and_remap_matrix_initializer()
for more details. In this case, the provided row_vocab is the class vocabulary, and the expected shape is [new_class_vocab_size, 1]
.
ckpt_path
: Path to the TensorFlow checkpoint (version 2, TensorBundle
) from which the old matrix Tensor
will be loaded.bias_tensor_name
: Tensor name to load from in the checkpoints.new_class_vocab_size
: Number of entries in the new class vocab.old_class_vocab_file
: A scalar Tensor
of type string
containing the path to the old class vocabulary file.new_class_vocab_file
: A scalar Tensor
of type string
containing the path to the new class vocabulary file.num_class_oov_buckets
: int
specifying the number of out-of-vocabulary buckets to use for the classes. Must be >= 0.initializer
: Initializer function that accepts a 1-D tensor as the arg to specify the shape of the returned tensor. If None
, defaults to using zeros_initializer()
.max_rows_in_memory
: int
specifying the maximum number of rows to load from the checkpoint at once. If less than or equal to 0, the entire matrix will be loaded into memory. Setting this arg trades increased disk reads for lower memory usage.A variable initializer function.
© 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/framework/load_linear_multiclass_bias_initializer