Closed peteoleary closed 3 years ago
I have fixed this problem:
`def build(self, input_shape, mask=None): self.Wl = K.variable(self.init((self.latent_dim, self.latent_dim)), name="Wl")
self.Wc = K.variable(self.init((self.k, self.latent_dim)), name="Wc")
self.Ws = K.variable(self.init((self.k, self.latent_dim)), name="Ws")
self.whs = K.variable(self.init((1, self.k)), name="whs")
self.whc = K.variable(self.init((1, self.k)), name="whc")
self._trainable_weights = [self.Wl, self.Wc, self.Ws, self.whs, self.whc]`
Need to pass in names manually
`Exception has occurred: RuntimeError Unable to create link (name already exists) File "/Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/our3.py", line 400, in train callbacks=callbacks) File "/Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/go_defend.py", line 96, in embeddings_path='saved_models', saved_model_dir='saved_models', saved_model_filename=SAVED_MODEL_FILENAME )
The exception is thrown from:
self.model.fit([encoded_train_c, encoded_train_x], y=train_y, validation_data=([encoded_val_c, encoded_val_x], val_y), batch_size=batch_size, epochs=epochs, verbose=1, callbacks=callbacks)
Environment:
`(venv) Peters-MBP:news-dj-service pete_o$ pip list Package Version
absl-py 0.12.0 amqp 5.0.6 appdirs 1.4.3 astunparse 1.6.3 attrs 20.3.0 Automat 20.2.0 bcrypt 3.2.0 beautifulsoup4 4.7.1 billiard 3.6.4.0 blis 0.4.1 bs4 0.0.1 cached-property 1.5.2 cachetools 4.2.1 catalogue 1.0.0 celery 5.0.5 certifi 2019.3.9 cffi 1.14.5 chardet 3.0.4 Click 7.0 click-didyoumean 0.0.3 click-plugins 1.1.1 click-repl 0.1.6 cloud-tpu-client 0.10 constantly 15.1.0 corenlp 0.0.14 corenlp-protobuf 3.8.0 coverage 5.5 cryptography 3.4.7 cssselect 1.0.3 cymem 2.0.5 dateparser 1.0.0 decorator 5.0.7 dill 0.3.3 distlib 0.3.0 en-core-web-sm 2.2.0 feedfinder2 0.0.4 feedparser 5.2.1 filelock 3.0.12 Flask 1.0.2 flask-accept 0.0.6 Flask-Cors 3.0.7 Flask-JWT 0.3.2 Flask-PyMongo 2.3.0 futures 3.1.1 gast 0.3.3 glove-py 0.2.3 google-api-core 1.22.2 google-api-python-client 1.8.0 google-auth 1.28.1 google-auth-httplib2 0.1.0 google-auth-oauthlib 0.4.4 google-pasta 0.2.0 google-search-results 2.1.0 googleapis-common-protos 1.53.0 grpcio 1.37.1 gsearch 1.6.0 h5py 2.10.0 hammock 0.2.4 html5lib 1.1 httplib2 0.19.1 hyperlink 21.0.0 idna 2.8 importlib-metadata 1.6.0 incremental 21.3.0 itemadapter 0.2.0 itemloaders 1.0.4 itsdangerous 1.1.0 jieba3k 0.35.1 Jinja2 2.10 jmespath 0.10.0 joblib 1.0.1 jsonlines 2.0.0 Keras 2.4.3 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.2 kombu 5.0.2 lxml 4.6.3 Markdown 3.3.4 MarkupSafe 1.1.1 marshmallow 3.11.1 mock 4.0.3 mongomock 3.22.1 msgpack 1.0.2 msgpack-numpy 0.4.7.1 msgpack-python 0.5.6 murmurhash 1.0.5 newspaper3k 0.2.8 nltk 3.4 nose2 0.10.0 numpy 1.19.5 oauth2client 4.1.3 oauthlib 3.0.1 opt-einsum 3.3.0 pandas 1.2.4 parse 1.19.0 parsel 1.6.0 pathlib 1.0.1 pbr 5.6.0 Pillow 6.2.2 pip 21.1.1 pipenv 2018.11.26 plac 1.1.3 politifact 0.1 preshed 3.0.5 prompt-toolkit 3.0.18 Protego 0.1.16 protobuf 3.15.7 py-bcrypt 0.4 pyasn1 0.4.8 pyasn1-modules 0.2.8 pybind11 2.6.2 pycparser 2.20 pycurry 1.0 PyDispatcher 2.0.5 PyJWT 1.4.2 pymongo 3.11.4 pyOpenSSL 20.0.1 pyparsing 2.4.7 python-dateutil 2.8.0 python-dotenv 0.17.0 pytz 2021.1 PyYAML 5.1 queuelib 1.5.0 redis 3.5.3 regex 2021.4.4 requests 2.25.1 requests-file 1.4.3 requests-oauthlib 1.2.0 rsa 4.7.2 scikit-learn 0.24.2 scipy 1.4.1 Scrapy 2.4.1 selenium 3.141.0 sentinels 1.0.0 service-identity 18.1.0 setuptools 46.1.3 singledispatch 3.4.0.3 six 1.12.0 sklearn 0.0 soupsieve 1.8 spacy 2.2.3 srsly 1.0.5 stanford-corenlp 3.9.2 tensorboard 2.2.2 tensorboard-plugin-wit 1.8.0 tensorflow 2.2.0 tensorflow-estimator 2.2.0 termcolor 1.1.0 thinc 7.3.1 threadpoolctl 2.1.0 tinysegmenter 0.3 tldextract 2.2.1 toolz 0.11.1 tqdm 4.31.1 Twisted 21.2.0 twython 3.8.0 tzlocal 2.1 ujson 4.0.2 UNKNOWN 0.0.0 uritemplate 3.0.1 urllib3 1.26.4 vine 5.0.0 virtualenv 20.0.16 virtualenv-clone 0.5.4 w3lib 1.22.0 waitress 2.0.0 wasabi 0.8.2 wcwidth 0.2.5 webencodings 0.5.1 Werkzeug 0.15.1 wheel 0.34.2 wrapt 1.12.1 zipp 3.1.0 zope.interface 5.3.0 (venv) Peters-MBP:news-dj-service pete_o$ python --version Python 3.7.2 (venv) Peters-MBP:news-dj-service pete_o$ virtualenv --version virtualenv 20.0.16 from /Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/venv/lib/python3.7/site-packages/virtualenv/init.py (venv) Peters-MBP:news-dj-service pete_o$ pip --version pip 21.1.1 from /Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/venv/lib/python3.7/site-packages/pip (python 3.7)`