lululxvi / deeponet

Learning nonlinear operators via DeepONet
Other
474 stars 130 forks source link

AttributeError: module 'tensorflow' has no attribute 'gloabl_variables_initializer' #42

Closed SunNorean closed 10 months ago

SunNorean commented 10 months ago

Hello! When I run DeepONet_float32_batch.py, I get an error message that: Traceback (most recent call last): File "E:\AIss\DeepOnet\deeponet-master\deeponet-master\fractional\DeepONet_float32_batch.py", line 208, in sess.run(tf.gloabl_variables_initializer()) File "D:\software\anaconda\envs\tensorflow1.x\lib\site-packages\tensorflow_core\python\util\module_wrapper.py", line 193, in getattr attr = getattr(self._tfmw_wrapped_module, name) AttributeError: module 'tensorflow' has no attribute 'gloabl_variables_initializer'

I tried to modify this line of code:sess.run(tf.compat.v1.gloabl_variables_initializer()), but failed.

In this case, how should I modify the code? Thanks in advance!