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
{{ message }}
Repository navigation
Trying to fine tune with different data, But getting dimensionality mismatched for tensor #18
@localminimum
If I change training file then after running preprocessing, embedding file will change and its dimension is mismatched with the existing one. That is what I have noticed as per my knowledge.
Note: dimension does not mean embedding vector size of char/word.. Basically its giving error because number of words and chars are different. You can see here lhs shape= [326,64] rhs shape= [1427,64]
It's not that the number of words and chars are different. tf.assign happens when the pretrained weights are loaded.
It seems like you are trying to load a trained model where the character embeddings size is different to your current character embeddings size. Try training again from scratch with your new char embeddings.
On Thu 3 May, 2018, 10:51 AM localminimum, ***@***.***> wrote:
It's not that the number of words and chars are different. tf.assign
happens when the pretrained weights are loaded.
It seems like you are trying to load a trained model where the character
embeddings size is different to your current character embeddings size. Try
training again from scratch with your new char embeddings.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ASkx2KTKM2-7WzIn1N8wYfk49fny6c9Wks5tupPMgaJpZM4TuXgQ>
.
You can just train the new character embeddings from scratch while using the pretrained weights for other weights. But I don't have that feature implemented here. You might have to manually allocate each weight.
Hi! I'm new to tensorflow, and while I understand that I need to manually allocate weights to layers for the non-character embedding layers (it seems that word embeddings are non-trainable). Also, I don't understand how to restore only selected portions from checkpoint. It'll be really helpful if you could elaborate on what I need to do (or sample code)
Thanks in advance :)
@brojokm and @localminimum were you able to resolve this.
I am getting the same error.
Any help on how to "just train the new character embeddings from scratch while using the pretrained weights for other weights" is appreciated.
Activity
localminimum commentedon May 2, 2018
Hi,
Try re running the
config.py --mode preproif you make changes regarding embedding matricesbrojokm commentedon May 2, 2018
@localminimum
If I change training file then after running preprocessing, embedding file will change and its dimension is mismatched with the existing one. That is what I have noticed as per my knowledge.
Note: dimension does not mean embedding vector size of char/word.. Basically its giving error because number of words and chars are different. You can see here
lhs shape= [326,64] rhs shape= [1427,64]kindly help me to resolve this.
localminimum commentedon May 3, 2018
It's not that the number of words and chars are different. tf.assign happens when the pretrained weights are loaded.
It seems like you are trying to load a trained model where the character embeddings size is different to your current character embeddings size. Try training again from scratch with your new char embeddings.
brojokm commentedon May 3, 2018
localminimum commentedon May 3, 2018
You can just train the new character embeddings from scratch while using the pretrained weights for other weights. But I don't have that feature implemented here. You might have to manually allocate each weight.
brojokm commentedon May 3, 2018
Hi! I'm new to tensorflow, and while I understand that I need to manually allocate weights to layers for the non-character embedding layers (it seems that word embeddings are non-trainable). Also, I don't understand how to restore only selected portions from checkpoint. It'll be really helpful if you could elaborate on what I need to do (or sample code)
Thanks in advance :)
anshulsolanki commentedon Nov 15, 2018
@brojokm and @localminimum were you able to resolve this.
I am getting the same error.
Any help on how to "just train the new character embeddings from scratch while using the pretrained weights for other weights" is appreciated.