Add some new layers from BertModel and then 'grad' error occurs
I wanna do the fine-tuning work by adding a textcnn on the base of BertModel. I write a new class and add two layers of conv (like a textcnn) basically on Embedding Layer. And then an error occurs, called "grad can be implicitly created only for scalar outputs" i search for the Internet and can't find a good solution to that, hope someone can solve it
If you can share a (minimal) example reproducing the error, I can have a look.<|||||>I'm closing this. Feel free to re-open and share more information if you still have some issues.