I don't have any experience with abtract classes. But I need to use them for a script/
I imported the following:
from abc import ABCMeta, abstractmethod
from collections.abc import Callable, Mapping
from typing import Any, Optional, Tuple
When defining the variable loss_fn as follows:
LossFn = Callable[[tf.Tensor, tf.Tensor, Optional[tf.Tensor]],
Tuple[tf.Tensor, tf.Tensor, tf.Tensor, Optional[tf.Tensor]]]
I face the following error:
'ABCMeta' object is not subscriptable
Could someone help with debugging this issue please?
Callablefromtyping, notcollections.abc…?! - deceze