Missed TensorFlow World? Check out the recap. Learn more

tf.train.SaverDef

View source on GitHub

Class SaverDef

Aliases:

  • Class tf.compat.v1.train.SaverDef

__init__

__init__(**kwargs)

Properties

filename_tensor_name

string filename_tensor_name

keep_checkpoint_every_n_hours

float keep_checkpoint_every_n_hours

max_to_keep

int32 max_to_keep

restore_op_name

string restore_op_name

save_tensor_name

string save_tensor_name

sharded

bool sharded

version

CheckpointFormatVersion version

Methods

ByteSize

ByteSize()

Clear

Clear()

ClearField

ClearField(field_name)

DiscardUnknownFields

DiscardUnknownFields()

FindInitializationErrors

FindInitializationErrors()

Finds required fields which are not initialized.

Returns:

A list of strings. Each string is a path to an uninitialized field from the top-level message, e.g. "foo.bar[5].baz".

FromString

@staticmethod
FromString(s)

HasField

HasField(field_name)

IsInitialized

IsInitialized(errors=None)

Checks if all required fields of a message are set.

Args:

  • errors: A list which, if provided, will be populated with the field paths of all missing required fields.

Returns:

True iff the specified message has all required fields set.

ListFields

ListFields()

MergeFrom

MergeFrom(msg)

MergeFromString

MergeFromString(serialized)

RegisterExtension

@staticmethod
RegisterExtension(extension_handle)

SerializePartialToString

SerializePartialToString(**kwargs)

SerializeToString

SerializeToString(**kwargs)

SetInParent

SetInParent()

Sets the _cached_byte_size_dirty bit to true, and propagates this to our listener iff this was a state change.

UnknownFields

UnknownFields()

WhichOneof

WhichOneof(oneof_name)

Returns the name of the currently set field inside a oneof, or None.

__eq__

__eq__(other)

Class Members

  • CheckpointFormatVersion
  • LEGACY = 0
  • V1 = 1
  • V2 = 2