How to generate and save a model file with backprop/gradient nodes? Like the file from here: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/jit/tests/keras_imagenet_main.pbtxt

Any idea on generating and saving a tensorflow model that has gradient nodes like below and the example file on the repo
node {
name: “training/LossScaleOptimizer/gradients/res5c_branch2b_1/Conv2D_grad/Conv2DBackpropInput”
op: “Conv2DBackpropInput”
input: “ConstantFolding/training/LossScaleOptimizer/gradients/res5c_branch2b_1/Conv2D_grad/ShapeN-matshapes-0”
input: “res5c_branch2b_1/Conv2D/Cast”
input: “training/LossScaleOptimizer/gradients/bn5c_branch2b_1/FusedBatchNormV2_grad/FusedBatchNormGradV2”
device: “/job:localhost/replica:0/task:0/device:GPU:0”
attr {
key: “T”
value {
type: DT_HALF
}
}
attr {
key: “data_format”
value {
s: “NCHW”
}
}
attr {
key: “dilations”
value {
list {
i: 1
i: 1
i: 1
i: 1
}
}
}

Hi @bhavna_chowdary

Welcome to the TensorFlow Forum!

Could you please share minimal reproducible code to replicate the error and fix the issue? Thank you.