mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
tensorflow: add tf.distribute.experimental.coordinator.RemoteValue (#11349)
This commit is contained in:
@@ -47,6 +47,8 @@ tensorflow._aliases
|
||||
# but the real module file is completely different name (even package) and dynamically handled.
|
||||
# tf.initializers at runtime is <module 'keras.api._v2.keras.initializers' from '...'>
|
||||
tensorflow.initializers
|
||||
# Another cursed import magic similar to the one above.
|
||||
tensorflow.distribute.experimental.coordinator
|
||||
|
||||
# Layer constructor's always have **kwargs, but only allow a few specific values. PEP 692
|
||||
# would allow us to specify this with **kwargs and remove the need for these exceptions.
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Generic, TypeVar
|
||||
|
||||
from tensorflow._aliases import AnyArray
|
||||
|
||||
_Value = TypeVar("_Value", covariant=True)
|
||||
|
||||
class RemoteValue(Generic[_Value]):
|
||||
def fetch(self) -> AnyArray: ...
|
||||
def get(self) -> _Value: ...
|
||||
|
||||
def __getattr__(name: str) -> Incomplete: ...
|
||||
Reference in New Issue
Block a user