File tree 2 files changed +30
-0
lines changed
stubs/tensorflow/tensorflow/config
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ from _typeshed import Incomplete
2
+ from typing import NamedTuple
3
+
4
+ from tensorflow .config import experimental as experimental
5
+
6
+ class PhysicalDevice (NamedTuple ):
7
+ name : str
8
+ device_type : str
9
+
10
+ def list_physical_devices (device_type : None | str = None ) -> list [PhysicalDevice ]: ...
11
+ def get_visible_devices (device_type : None | str = None ) -> list [PhysicalDevice ]: ...
12
+ def set_visible_devices (devices : list [PhysicalDevice ] | PhysicalDevice , device_type : None | str = None ) -> None : ...
13
+ def __getattr__ (name : str ) -> Incomplete : ...
Original file line number Diff line number Diff line change
1
+ import typing_extensions
2
+ from _typeshed import Incomplete
3
+ from typing import TypedDict
4
+
5
+ from tensorflow .config import PhysicalDevice
6
+
7
+ class _MemoryInfo (TypedDict ):
8
+ current : int
9
+ peak : int
10
+
11
+ def get_memory_info (device : str ) -> _MemoryInfo : ...
12
+ def reset_memory_stats (device : str ) -> None : ...
13
+ @typing_extensions .deprecated ("This function is deprecated in favor of tf.config.experimental.get_memory_info" )
14
+ def get_memory_usage (device : PhysicalDevice ) -> int : ...
15
+ def get_memory_growth (device : PhysicalDevice ) -> bool : ...
16
+ def set_memory_growth (device : PhysicalDevice , enable : bool ) -> None : ...
17
+ def __getattr__ (name : str ) -> Incomplete : ...
You can’t perform that action at this time.
0 commit comments