lululxvi / deepxde

A library for scientific machine learning and physics-informed learning
https://deepxde.readthedocs.io
GNU Lesser General Public License v2.1
2.59k stars 733 forks source link

'Tensor' object has no attribute 'ref' #291

Closed alecjervis1 closed 2 years ago

alecjervis1 commented 3 years ago

Hello, When I try and run a file that uses 'dde.grad.hessian' I receive an error saying the following: 'Tensor' object has no attribute 'ref'. I am quite new to all of this and so it is probably quite a straight forward issue but any help would be more than welcome. Thanks in advance, Alec

lululxvi commented 3 years ago

Is your tf version >=2.2?

alecjervis1 commented 3 years ago

Hello, thank you for your response - this was indeed the solution to the issue.

I am trying to create a heat transfer model on a square geometry with: a constant temperature on one side and also a tube running through the centre removing heat at a constant rate. I am having further problems that I wondered if you could assist me with please; namely:

Screenshot 2021-05-25 at 17 28 38 Screenshot 2021-05-25 at 17 29 08 deepxdeplot

This following plot was found by altering the alpha2 value to 100 and changing the side of constant temperature: deepxdeplot

Again, thank you in advance for any responses!

Also if anyone could point me in the direction of any good sources to gain a deeper understanding it would be very helpful!

Thank you, Alec

lululxvi commented 3 years ago
DSJ414 commented 2 months ago

你的 tf 版本是否>=2.2?

我的tensorflow版本是1.15,deepxde版本是0.9.0,也碰到的这样的问题,应该怎么解决呢?