AifeducationConfiguration {aifeducation} | R Documentation |
R6 class for settting the global machine learning framework.
Description
R6 class for settting the global machine learning framework.
R6 class for settting the global machine learning framework.
Details
R6 class for setting the global machine learning framework to 'PyTorch' or 'tensorflow'.
Value
The function does nothing return. It is used for its side effects.
Methods
Public methods
Method get_framework()
Method for requesting the used machine learning framework.
Usage
AifeducationConfiguration$get_framework()
Returns
Returns a string
containing the used machine learning framework
for TextEmbeddingModels as well as for TextEmbeddingClassifierNeuralNet.
Method set_global_ml_backend()
Method for setting the global machine learning framework.
Usage
AifeducationConfiguration$set_global_ml_backend(backend)
Arguments
backend
string
Framework to use for training and inference.backend="tensorflow"
for 'tensorflow' andbackend="pytorch"
for 'PyTorch'.
Returns
This method does nothing return. It is used for setting the global configuration of 'aifeducation'.
Method global_framework_set()
Method for checking if the global ml framework is set.
Usage
AifeducationConfiguration$global_framework_set()
Returns
Return TRUE
if the global machine learning framework is set.
Otherwise FALSE
.
Method clone()
The objects of this class are cloneable with this method.
Usage
AifeducationConfiguration$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
Other Installation and Configuration:
aifeducation_config
,
check_aif_py_modules()
,
install_py_modules()
,
set_config_cpu_only()
,
set_config_gpu_low_memory()
,
set_config_os_environ_logger()
,
set_config_tf_logger()
,
set_transformers_logger()
Examples
library(aifeducation)
#Example for setting the global machine learning framework
#aifeducation_config is the object created during loading the package
#For using PyTorch
aifeducation_config$set_global_ml_backend("pytorch")
#For using Tensorflow
aifeducation_config$set_global_ml_backend("pytorch")
#Example for requesting the global machine learning framework
aifeducation_config$get_framework()
#Example for checking if the global macheine learning framework is set
aifeducation_config$global_framework_set()