text_expansion
text_expansion copied to clipboard
NotImplementedError: Cannot convert a symbolic Tensor (bert/encoder/strided_slice:0) to a numpy array.
Hi! I have a problem in google colab (colab.research.google.com), during start Text_Expansion.ipynb (https://colab.research.google.com/github/dilyararimovna/text_expansion/blob/main/Text_Expansion.ipynb)
==================== Error =============================================== NotImplementedError Traceback (most recent call last)
15 frames
<array_function internals> in prod(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py in array(self) 734 def array(self): 735 raise NotImplementedError("Cannot convert a symbolic Tensor ({}) to a numpy" --> 736 " array.".format(self.name)) 737 738 def len(self):
NotImplementedError: Cannot convert a symbolic Tensor (bert/encoder/strided_slice:0) to a numpy array.
=======================In this piece code============================================
import jsonlines
import json
import os
import random
import re
import string
from copy import deepcopy
from pathlib import Path
import numpy as np import pandas as pd import pymorphy2 import spacy import xx_ent_wiki_sm from deeppavlov import build_model, configs
morph = pymorphy2.MorphAnalyzer()
nlp = xx_ent_wiki_sm.load() nlp.add_pipe(nlp.create_pipe('sentencizer'), first=True)
syntax_model = build_model(configs.syntax.syntax_ru_syntagrus_bert, download=True)
Error on this line : syntax_model = build_model(configs.syntax.syntax_ru_syntagrus_bert, download=True)
Can anybody help me? Thanks.