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
Code to build the model is mentioned in my previous bug report #1219
I call the fit method with:
_model.fit(x, y, batch_size:16, verbose:1, epochs:1, shuffle:false);
Input and labels passed in ( 'x' and 'y') are both NDArray with shape (1872, 256, 256, 1). That is, 1872 grey-scale images, 256x256px.
I have googled and can only find one StackOverflow answer that mentions that the labels (y) should be passed in, which I have already done.
I have the same model in Python and can train it with X and Y numpy arrays of similar shape (8100, 256, 256, 1), only difference is a different number of images.
I wish to report that I am also experiencing the issue described here, namely Tensorflow.RuntimeError: Invalid tape state.
Here are some details about my environment:
TensorFlow.NET Version: 0.150.0
Operating System: Windows 10
IDE: Visual Studio 2022
Usage Scenario: Training a U-Net model for image segmentation.
I am interested in any suggestions or solutions that may have been found since this issue was created. Moreover, if additional information from my side could help resolve this issue, I would be happy to provide it.
Thank you very much for your attention and for any effort aimed at resolving this issue. It is very important to me and my project.
Hi, I'm one of the maintainers of tensorflow.net. However I'm sorry that none of the main maintainers of this repo is available at this time. We won't reject PRs but we don't have enough time to fix BUG or add features now. I feel sorry for that.
I've once met the same problem during the development. Generally, this BUG is because of wrong traced graph structure info or invalid backward ops in your model.
Tape works as below: it records the information of nodes and edges of the graph, which is traced during the model running. When it's required to compute gradients, it pops the nodes at topological order, begging from the output node(s).
If you want debug it, please at first narrow the scope for debugging, finding a smallest model structure which could reproduce this problem. Then, run it with the source code and see the records in the Tape. You'll finally find which number of the operation is missed in the tape informations. After that, you could try to fix it. Good luck!
Description
I have built a U-Net convolutional network. When calling model.fit() I get an exception:
Reproduction Steps
Summary of the U-Net model:
Code to build the model is mentioned in my previous bug report #1219
I call the fit method with:
Input and labels passed in ( 'x' and 'y') are both NDArray with shape (1872, 256, 256, 1). That is, 1872 grey-scale images, 256x256px.
I have googled and can only find one StackOverflow answer that mentions that the labels (y) should be passed in, which I have already done.
I have the same model in Python and can train it with X and Y numpy arrays of similar shape (8100, 256, 256, 1), only difference is a different number of images.
Known Workarounds
No response
Configuration and Other Information
OS: Windows 11
.Net: 6.0
SciSharp.TensorFlow.Redist 2.16.0
TensorFlow.Keras 0.15.0
TensorFlow.Net 0.150.0
The text was updated successfully, but these errors were encountered: