ml4chem.backends package

Submodules

ml4chem.backends.available module

ml4chem.backends.available.available_backends()[source]

A function that reports available backends

ml4chem.backends.available.cuda_is_available(backend)[source]

Check if cuda is avaible for the current backend

Parameters:

backend (obj) – A backend object

Returns:

cuda_available – Whether or not cuda is there.

Return type:

bool

ml4chem.backends.operations module

class ml4chem.backends.operations.BackendOperations(backend)[source]

Bases: object

A class for centralizing backend operations

This class will be growing systematically. This is probably not the best solution but can be worked out later.

Parameters:

backend (object) – A backend object: numpy, tensorflow, or pytorch.

divide(a, b)[source]

Divide two vectors/tensors

dot(a, b)[source]

Dot product

exp(a)[source]

Exponential of a number

from_numpy(a)[source]

Convert from numpy to right data type

log10(a)[source]

Log base 10

logspace(a, b, num)[source]

Logspace

norm(a)[source]

Norm between two vectors

sum(a)[source]

Sum a list of values

to_numpy(a)[source]

Convert from numpy to right data type

Module contents