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
Inference works perfectly with the pre-trained model.
However, when I try to train, I get the following error. Looks like things have changed from TF1.4 to TF 1.13 and I'd be glad if you tell how to fix this?
Traceback (most recent call last):
File "./main.py", line 118, in <module>
trainOp=createUpdateOp()
File "./main.py", line 105, in createUpdateOp
grads = optimizer.compute_gradients(totalLoss, var_list=net.getVariables())
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/training/optimizer.py", line 512, in compute_gradients
colocate_gradients_with_ops=colocate_gradients_with_ops)
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/ops/gradients_impl.py", line 664, in gradients
unconnected_gradients)
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/ops/gradients_impl.py", line 965, in _GradientsHelper
lambda: grad_fn(op, *out_grads))
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/ops/gradients_impl.py", line 420, in _MaybeCompile
return grad_fn() # Exit early
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/ops/gradients_impl.py", line 965, in <lambda>
lambda: grad_fn(op, *out_grads))
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_grad.py", line 84, in _SwitchGrad
return merge(grad, name="cond_grad")[0], None
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 406, in merge
nest.assert_same_structure(inputs[0], v, expand_composites=True)
File "/home/lenik/tfenv/local/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 249, in assert_same_structure
% (str(e), str1, str2))
ValueError: The two structures don't have the same nested structure.
lazydroid
changed the title
TF 1.13, 1.14 says: "The two structures don't have the same nested structure."
TF 1.13 says: "The two structures don't have the same nested structure."
Jan 29, 2019
Inference works perfectly with the pre-trained model.
However, when I try to train, I get the following error. Looks like things have changed from TF1.4 to TF 1.13 and I'd be glad if you tell how to fix this?
First structure: type=IndexedSlices str=IndexedSlices(indices=Tensor("optimizer/gradients/RPNloss/cond/calcRPNLoss/calcAllRPNLosses/cond_1/getNegativeLosses/GatherNd/Switch_grad/cond_grad/range:0", shape=(?,), dtype=int32), values=Tensor("optimizer/gradients/zeros_5:0", shape=(?,), dtype=float32), dense_shape=Tensor("optimizer/gradients/RPNloss/cond/calcRPNLoss/calcAllRPNLosses/cond_1/getNegativeLosses/GatherNd/Switch_grad/cond_grad/Shape:0", shape=(1,), dtype=int32))
Second structure: type=IndexedSlices str=IndexedSlices(indices=Tensor("optimizer/gradients/RPNloss/cond/calcRPNLoss/calcAllRPNLosses/cond_1/getNegativeLosses/GatherNd_grad/Squeeze:0", shape=(?,), dtype=int32), values=IndexedSlices(indices=Tensor("optimizer/gradients/RPNloss/cond/calcRPNLoss/calcAllRPNLosses/cond_1/Merge_grad/cond_grad/Switch_1:1", shape=(?,), dtype=int32), values=Tensor("optimizer/gradients/RPNloss/cond/calcRPNLoss/calcAllRPNLosses/cond_1/Merge_grad/tuple/control_dependency_1:0", shape=(?,), dtype=float32), dense_shape=Tensor("optimizer/gradients/RPNloss/cond/calcRPNLoss/calcAllRPNLosses/cond_1/Merge_grad/cond_grad/Switch_2:1", shape=(1,), dtype=int32)), dense_shape=Tensor("optimizer/gradients/RPNloss/cond/calcRPNLoss/calcAllRPNLosses/cond_1/getNegativeLosses/GatherNd_grad/Shape:0", shape=(1,), dtype=int32))
The text was updated successfully, but these errors were encountered: