API - Operation System

Operation system, more functions can be found in TensorFlow API.

exit_tf([sess]) Close tensorboard and nvidia-process if available
clear_all([printable]) Clears all the placeholder variables of keep prob, including keeping probabilities of all dropout, denoising, dropconnect etc.
set_gpu_fraction([sess, gpu_fraction]) Set the GPU memory fraction for the application.
disable_print() Disable console output.
enable_print() Enable console output.
temporary_disable_print() Temporarily disable console output.
get_site_packages_directory() Print and return the site-packages directory.

TensorFlow functions

tensorlayer.ops.exit_tf(sess=None)[source]

Close tensorboard and nvidia-process if available

Parameters:
sess : a session instance of TensorFlow

TensorFlow session

tensorlayer.ops.clear_all(printable=True)[source]

Clears all the placeholder variables of keep prob, including keeping probabilities of all dropout, denoising, dropconnect etc.

Parameters:
printable : boolean

If True, print all deleted variables.

GPU functions

tensorlayer.ops.set_gpu_fraction(sess=None, gpu_fraction=0.3)[source]

Set the GPU memory fraction for the application.

Parameters:
sess : a session instance of TensorFlow

TensorFlow session

gpu_fraction : a float

Fraction of GPU memory, (0 ~ 1]

References

Console display

tensorlayer.ops.disable_print()[source]

Disable console output.

Examples

>>> print("You can see me")
>>> tl.ops.disable_print()
>>> print(" You can't see me")
>>> tl.ops.enable_print()
>>> print("You can see me")
tensorlayer.ops.enable_print()[source]

Enable console output.

Examples

  • see tl.ops.disable_print()
class tensorlayer.ops.temporary_disable_print[source]

Temporarily disable console output.

Examples

>>> print("You can see me")
>>> with tl.ops.temporary_disable_print() as t:
>>>     print("You can't see me")
>>> print("You can see me")

Packages information

tensorlayer.ops.get_site_packages_directory()[source]

Print and return the site-packages directory.

Examples

>>> loc = tl.ops.get_site_packages_directory()