lib/dnn/core/utils.rb in ruby-dnn-0.9.0 vs lib/dnn/core/utils.rb in ruby-dnn-0.9.1
- old
+ new
@@ -1,9 +1,7 @@
module DNN
# This module provides utility functions.
module Utils
- NMath = Xumo::NMath
-
# Categorize labels into "num_classes" classes.
def self.to_categorical(y, num_classes, narray_type = nil)
narray_type ||= y.class
y2 = narray_type.zeros(y.shape[0], num_classes)
y.shape[0].times do |i|