You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried the jupyternotebook file " tutorial-1.ipynb".
It produced the Error: "TypeError: unsupported format string passed to LabelTensor.format"after the first epoch iteration.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In [3], line 10
8 pinn.span_pts(20, 'grid', ['D'])
9 pinn.span_pts(20, 'grid', ['gamma1', 'gamma2', 'gamma3', 'gamma4'])
---> 10 pinn.train(5000, 100)
File ~\PycharmProjects\pythonProject\venv\lib\site-packages\pina\pinn.py:263, in PINN.train(self, stop, frequency_print, trial)
261 print('[epoch {:05d}] {:.6e} '.format(self.trained_epoch, sum(losses).item()), end='')
262 for loss in losses:
--> 263 print('{:.6e} '.format(loss), end='')
264 print()
266 return sum(losses).item()
File ~\PycharmProjects\pythonProject\venv\lib\site-packages\torch\_tensor.py:855, in Tensor.__format__(self, format_spec)
853 def __format__(self, format_spec):
854 if has_torch_function_unary(self):
--> 855 return handle_torch_function(Tensor.__format__, (self,), self, format_spec)
856 if self.dim() == 0 and not self.is_meta and type(self) is Tensor:
857 return self.item().__format__(format_spec)
File ~\PycharmProjects\pythonProject\venv\lib\site-packages\torch\overrides.py:1534, in handle_torch_function(public_api, relevant_args, *args, **kwargs)
1528 warnings.warn("Defining your `__torch_function__ as a plain method is deprecated and "
1529 "will be an error in future, please define it as a classmethod.",
1530 DeprecationWarning)
1532 # Use `public_api` instead of `implementation` so __torch_function__
1533 # implementations can do equality/identity comparisons.
-> 1534 result = torch_func_method(public_api, types, args, kwargs)
1536 if result is not NotImplemented:
1537 return result
File ~\PycharmProjects\pythonProject\venv\lib\site-packages\torch\_tensor.py:1278, in Tensor.__torch_function__(cls, func, types, args, kwargs)
1275 return NotImplemented
1277 with _C.DisableTorchFunction():
-> 1278 ret = func(*args, **kwargs)
1279 if func in get_default_nowrap_functions():
1280 return ret
File ~\PycharmProjects\pythonProject\venv\lib\site-packages\torch\_tensor.py:858, in Tensor.__format__(self, format_spec)
856 if self.dim() == 0 and not self.is_meta and type(self) is Tensor:
857 return self.item().__format__(format_spec)
--> 858 return object.__format__(self, format_spec)
TypeError: unsupported format string passed to LabelTensor.__format__
The text was updated successfully, but these errors were encountered:
Tried the jupyternotebook file " tutorial-1.ipynb".
It produced the Error: "TypeError: unsupported format string passed to LabelTensor.format"after the first epoch iteration.
The text was updated successfully, but these errors were encountered: