Closed Littlepuppet closed 2 years ago
Hello, after I configured the file according to your requirements, I ran the code and found that the following error was reported.It would be a big help if anyone can guide a way! Thanks in Advance :)
Which version of tensorflow are you using?I am using tf1.15.0, and I don`t have the same problem as yours
Hello, after I configured the file according to your requirements, I ran the code and found that the following error was reported.It would be a big help if anyone can guide a way! Thanks in Advance :)
Which version of tensorflow are you using?I am using tf1.15.0, and I don`t have the same problem as yours
I use the version tf 1.14.0 given in your requirements.txt.
I also find the version of tensorboard cannot match both the version of tf1.14.0 and tf_gpu 2.0.0 in therequirements.txt.
Hello,
I'm working on your issue. I modified my env to try to replicate the problem. If you want to use Tensorflow 2+, you should use TensorFlow 2.2.0. I tried with a more recent version but I got the same error and didn't find a solution so far.
This is my suggested solution:
Create a new env with this new requirement file:
name: GHVN_env_36
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1
- _openmp_mutex=4.5
- _tflow_select=2.1.0
- abseil-cpp=20210324.2
- absl-py=1.0.0
- aiohttp=3.7.4.post0
- astor=0.8.1
- astunparse=1.6.3
- async-timeout=3.0.1
- attrs=21.4.0
- blinker=1.4
- brotlipy=0.7.0
- c-ares=1.18.1
- ca-certificates=2021.10.8
- cachetools=4.2.4
- certifi=2021.5.30
- cffi=1.14.6
- chardet=4.0.0
- charset-normalizer=2.0.9
- click=8.0.1
- cryptography=35.0.0
- cudatoolkit=10.1.243
- cudnn=7.6.5.32
- cupti=10.1.168
- dataclasses=0.8
- gast=0.3.3
- giflib=5.2.1
- google-auth=1.35.0
- google-auth-oauthlib=0.4.6
- google-pasta=0.2.0
- grpc-cpp=1.37.1
- grpcio=1.37.1
- h5py=2.10.0
- hdf5=1.10.6
- icu=68.2
- idna=3.1
- idna_ssl=1.1.0
- importlib-metadata=4.8.1
- joblib=1.1.0
- jpeg=9d
- keras-preprocessing=1.1.2
- krb5=1.19.2
- ld_impl_linux-64=2.36.1
- libblas=3.9.0
- libcblas=3.9.0
- libcurl=7.80.0
- libedit=3.1.20191231
- libev=4.33
- libffi=3.4.2
- libgcc-ng=11.2.0
- libgfortran-ng=11.2.0
- libgfortran5=11.2.0
- libgomp=11.2.0
- liblapack=3.9.0
- libnghttp2=1.43.0
- libnsl=2.0.0
- libopenblas=0.3.18
- libpng=1.6.37
- libprotobuf=3.15.8
- libssh2=1.10.0
- libstdcxx-ng=11.2.0
- libzlib=1.2.11
- markdown=3.3.6
- multidict=5.2.0
- ncurses=6.2
- numpy=1.19.5
- oauthlib=3.1.1
- openssl=1.1.1l
- opt_einsum=3.3.0
- pandas=1.1.5
- pip=21.3.1
- protobuf=3.15.8
- pyasn1=0.4.8
- pyasn1-modules=0.2.7
- pycparser=2.21
- pyjwt=2.3.0
- pyopenssl=21.0.0
- pysocks=1.7.1
- python=3.6.15
- python-dateutil=2.8.2
- python-flatbuffers=1.12
- python_abi=3.6
- pytz=2021.3
- pyu2f=0.1.5
- re2=2021.08.01
- readline=8.1
- requests=2.26.0
- requests-oauthlib=1.3.0
- rsa=4.8
- scikit-learn=0.24.2
- scipy=1.5.3
- setuptools=49.6.0
- six=1.16.0
- snappy=1.1.8
- sqlite=3.37.0
- tensorboard=2.4.1
- tensorboard-plugin-wit=1.8.0
- tensorflow=2.2.0
- tensorflow-base=2.2.0
- tensorflow-estimator=2.4.0
- tensorflow-gpu=2.2.0
- termcolor=1.1.0
- threadpoolctl=3.0.0
- tk=8.6.11
- typing-extensions=4.0.1
- typing_extensions=4.0.1
- urllib3=1.26.7
- werkzeug=2.0.1
- wheel=0.37.1
- wrapt=1.13.1
- xz=5.2.5
- yarl=1.6.3
- zipp=3.6.0
- zlib=1.2.11
Furthermore, you will have to modify the model by doing it for the "config == "fixe_filter" in the file NILM_function.py
replace the line:
eps = tf.keras.Input(tensor=K.random_normal(shape=(K.shape(x)[0], latent_dim)), name="eps")
with:
def get_eps(x, latent_dim):
eps = K.random_normal(shape=(K.shape(x)[0], latent_dim))
return eps
eps = tf.keras.layers.Lambda(get_eps, arguments={"latent_dim": latent_dim})(x)
and change:
model = tf.keras.Model(inputs=[x, eps], outputs=[x_pred])
for
model = tf.keras.Model(inputs=[x], outputs=[x_pred])
Finally, you have to add the following line after imports in NILM_disaggregation.py and NILM_test.py.
tf.compat.v1.disable_eager_execution()
Let me know if this solution works, I will update the files in GitHub.
Thanks,
Antoine
No need to modify the environment. I found that after modifying the code you mentioned, the model can run successfully. Thank you very much for your guidance.
Hello, after I configured the file according to your requirements, I ran the code and found that the following error was reported.It would be a big help if anyone can guide a way! Thanks in Advance :)