Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Gradient export #36

@ZofiaTr

Description

@ZofiaTr

Hi Frederik,

I am testing the class for gradient exporting from TATi. When I run my python code in the terminal, everything works fine, but when I do the same in the jupyter notebook I got this error:

Create model for initial optimization
[<tf.Tensor 'walker1/gradients/walker1/layer1/Wx_plus_b/MatMul_grad/MatMul_1:0' shape=(2, 2) dtype=float32>]
[<tf.Tensor 'walker1/gradients_1/walker1/layer1/Wx_plus_b/add_grad/Reshape_1:0' shape=(2,) dtype=float32>]
[<tf.Tensor 'walker1/gradients_2/walker1/layer2/Wx_plus_b/MatMul_grad/MatMul_1:0' shape=(2, 1) dtype=float32>]
[<tf.Tensor 'walker1/gradients_3/walker1/layer2/Wx_plus_b/add_grad/Reshape_1:0' shape=(1,) dtype=float32>]
[<tf.Tensor 'walker1/gradients_4/walker1/output/Wx_plus_b/MatMul_grad/MatMul_1:0' shape=(1, 1) dtype=float32>]
[<tf.Tensor 'walker1/gradients_5/walker1/output/Wx_plus_b/add_grad/Reshape_1:0' shape=(1,) dtype=float32>]

.....

FailedPreconditionError (see above for traceback): GetNext() failed because the iterator has not been initialized. Ensure that you have run the initializer operation for this iterator before getting the next element.
[[Node: IteratorGetNext = IteratorGetNextoutput_shapes=[[?,2], [?,1]], output_types=[DT_FLOAT, DT_INT32], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

Do you have any idea what is going on? It it not critical, I can always run it in the terminal..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions