-
Notifications
You must be signed in to change notification settings - Fork 14
batch_size
error when lstm is stateful
#107
Comments
Hmm.. this is during prediction or training? would this help:
I think right after this line. |
This was during training. I'll give that a try |
So I added
right above this line Line 30 in ec2d9b9
And I got a new error:
|
Hey all, I'm working on integrating |
Lots of references that I find regarding this solve the problem by simply When I find a place to specify |
Thanks for looking into this, @jdiaz4302. I don't think we ever did find a solution to this. I've found a similar difficulty in finding solutions for other issues because we have used the "model subclassing" approach. From my understanding, I don't think we can use the other two approaches (sequential api and functional api) because they allow for much less customization. For this issue in particular, I think it has something to do with specifying the batch size in a build statement, like you mentioned. I think I got a little farther at doing this here. Are you able to get this error? That's awesome that you have a lot of experience with pytorch. We have casually wondered if using pytorch instead of TF would be better given that it seems to be more popular in the research community. Because we have invested in this TF code pretty heavily and since we didn't have any pytorch experience amongst us, we haven't thought very seriously about it. But now that you've joined, I wonder if it'd be worth it to think about it again. |
Yeah, that's one of the (temporary?) dead-ends that I've found so far - don't think that I've gotten to that bottom of what it means though |
Have you tried adding
right above this line
right above this line . Will also need to move these lines above the |
To clarify, I've been working at the function-level in an ipynb that simplifies the usage (based off the one you stored in But, when I add a |
can you share the stripped down code that you are working with? |
This is my modification of Jacob's experimenting notebook that worked for some earlier version or modification of the code (linked earlier via "run-pgdl-da") Block 1:
Block 2
Block 3
Block 4 (raises
Block 5
Block 6
Block 7 (raises the
|
This might help? tensorflow/tensorflow#46840 (comment)
|
Their error actually doesn't replicate in my notebook (I'm using the singularity container 2.0 for BUT, I do think looking at more generic issues in other libraries (e.g., |
Hmm. Yeah I can't reproduce that error either, but I can reproduce the error at the top of the issue thread |
I think I've made some progress/findings that could lead to a fix: Regarding using
|
Cool! confirmed that it works for me for resetting the states using
so far so good with the
|
@jzwart Good idea to test that. If I print all of those that worked and didn't work (i.e.,
Unfortunately this fix doesn't apply to our original issue with |
I'm getting this error when trying to use
LSTMModel
:The text was updated successfully, but these errors were encountered: