Module: DNN

Defined in:
lib/dnn.rb,
lib/dnn/image.rb,
lib/dnn/version.rb,
lib/dnn/core/link.rb,
lib/dnn/core/error.rb,
lib/dnn/core/param.rb,
lib/dnn/core/utils.rb,
lib/dnn/core/global.rb,
lib/dnn/core/losses.rb,
lib/dnn/core/models.rb,
lib/dnn/core/savers.rb,
lib/dnn/core/tensor.rb,
lib/dnn/core/iterator.rb,
lib/dnn/datasets/iris.rb,
lib/dnn/core/callbacks.rb,
lib/dnn/datasets/mnist.rb,
lib/dnn/core/optimizers.rb,
lib/dnn/datasets/stl-10.rb,
lib/dnn/datasets/cifar10.rb,
lib/dnn/core/initializers.rb,
lib/dnn/core/regularizers.rb,
lib/dnn/datasets/cifar100.rb,
lib/dnn/datasets/downloader.rb,
lib/dnn/core/layers/embedding.rb,
lib/dnn/keras-model-convertor.rb,
lib/dnn/core/layers/cnn_layers.rb,
lib/dnn/core/layers/rnn_layers.rb,
lib/dnn/datasets/fashion-mnist.rb,
lib/dnn/core/layers/activations.rb,
lib/dnn/core/layers/math_layers.rb,
lib/dnn/core/layers/basic_layers.rb,
lib/dnn/core/layers/merge_layers.rb,
lib/dnn/core/layers/split_layers.rb,
lib/dnn/core/layers/normalizations.rb,
ext/rb_stb_image/rb_stb_image.c

Defined Under Namespace

Modules: CIFAR10, CIFAR100, Callbacks, FashionMNIST, Image, Initializers, Iris, Layers, Loaders, Losses, MNIST, Models, Optimizers, Regularizers, STL10, Savers, Stb, Utils Classes: DNNError, DNNShapeError, DNN_DownloadError, DNN_Iris_LoadError, Downloader, Iterator, Link, Param, Tensor

Constant Summary collapse

Xumo =
::Numo
VERSION =
"1.3.0"
DOWNLOADS_PATH =
ENV["RUBY_DNN_DOWNLOADS_PATH"] || __dir__

Class Method Summary collapse

Class Method Details

.cudnn_available?Boolean

Returns:

  • (Boolean)


23
24
25
26
# File 'lib/dnn.rb', line 23

def self.cudnn_available?
  return false unless defined? ::Cumo
  Cumo::CUDA::CUDNN.available?
end

.learning_phaseObject



2
3
4
# File 'lib/dnn/core/global.rb', line 2

def self.learning_phase
  @learning_phase
end

.learning_phase=(bool) ⇒ Object



6
7
8
# File 'lib/dnn/core/global.rb', line 6

def self.learning_phase=(bool)
  @learning_phase = bool
end

.use_cudnn?Boolean

Returns:

  • (Boolean)


28
29
30
31
# File 'lib/dnn.rb', line 28

def self.use_cudnn?
  return false unless ENV["RUBY_DNN_USE_CUDNN"] == "ENABLE"
  cudnn_available?
end

.use_cumo?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/dnn.rb', line 19

def self.use_cumo?
  defined? ::Cumo
end