class SHAInet::CNNData

Defined in:

shainet/data/cnn_data.cr

Constructors

Instance Method Summary

Instance methods inherited from class SHAInet::Data

array_for_label(a_label) array_for_label, data data, denormalize(x, xmin, xmax) denormalize, denormalize_outputs(outputs : Array(GenNum)) denormalize_outputs, inputs : Array(Array(Float64)) inputs, label_for_array(an_array) label_for_array, labels : Array(String) labels, labels=(label_array) labels=, normalize(x, xmin, xmax) normalize, normalize_inputs(inputs : Array(GenNum)) normalize_inputs, normalize_min_max(data : Array(Array(Float64)))
normalize_min_max
normalize_min_max
, normalize_outputs(outputs : Array(GenNum)) normalize_outputs, normalized_inputs : Array(Array(Float64)) normalized_inputs, normalized_inputs=(normalized_inputs : Array(Array(Float64))) normalized_inputs=, normalized_outputs : Array(Array(Float64)) normalized_outputs, normalized_outputs=(normalized_outputs : Array(Array(Float64))) normalized_outputs=, outputs : Array(Array(Float64)) outputs, outputs=(outputs : Array(Array(Float64))) outputs=, raw_data raw_data, size size, split(factor) split, to_onehot(data : Array(Array(Float64)), vector_size : Int32) to_onehot

Constructor methods inherited from class SHAInet::Data

new(inputs : Array(Array(Float64)), outputs : Array(Array(Float64))) new

Class methods inherited from class SHAInet::Data

new_with_csv_input_target(csv_file_path, input_column_range, target_column) new_with_csv_input_target

Constructor Detail

def self.new(inputs : Array(Array(Float64)), outputs : Array(Array(Float64))) #

When inputs are one-dimentional


[View source]
def self.new(inputs : CNNinputData, outputs : CNNoutputData) #

When inputs are three-dimentional


[View source]

Instance Method Detail

def data_pairs : Array({input: Array(Array(Array(Float64))), output: Array(Float64)}) #

[View source]
def for_mnist_conv #

Normalize input to 3D image and change expected outputs to 1-hot vector


[View source]
def vector_to_2d(vector : Array(Float64), window_size : Int32) #

[View source]