You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file src/ashpy/contexts/context.py contains the following docstring
r"""
Primitive Context Interface.
``Contexts`` are checkpointable (subclassed from :py:class:`tf.train.Checkpoint`)
collections of variable encapsulated in a Python Class as a way to seamlessly
handle information transfer.
"""
but the Context class inherits from Object, not from tf.train.Checkpoint.
Also, there is no way to access the optimizer from the Context object.
Moreover, we initialize in the constructor (thus, during the declaration since tf.Variable are mutable objects) the global_step with tf.Variable(0, name="global_step", trainable=False, dtype=tf.int64). This must be avoided since a context is created always from (magic) a well-defined context - therefore we can initialize this to None
The text was updated successfully, but these errors were encountered:
mr-ubik
changed the title
Context are not checkpointable; no optimizer in Context; global_step initilization not OK
[BUG] Context are not checkpointable; no optimizer in Context; global_step initilization not OK
Apr 7, 2020
mr-ubik
changed the title
[BUG] Context are not checkpointable; no optimizer in Context; global_step initilization not OK
[BUG] - Context are not checkpointable; no optimizer in Context; global_step initilization not OK
Apr 7, 2020
The file
src/ashpy/contexts/context.py
contains the following docstringbut the
Context
class inherits from Object, not fromtf.train.Checkpoint
.Also, there is no way to access the optimizer from the
Context
object.Moreover, we initialize in the constructor (thus, during the declaration since
tf.Variable
are mutable objects) theglobal_step
withtf.Variable(0, name="global_step", trainable=False, dtype=tf.int64)
. This must be avoided since a context is created always from (magic) a well-defined context - therefore we can initialize this toNone
The text was updated successfully, but these errors were encountered: