📄 libfann.py
字号:
# This file was created automatically by SWIG.# Don't modify this file, modify the SWIG interface instead.# This file is compatible with both classic and new-style classes.import _libfanndef _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "this"): if isinstance(value, class_type): self.__dict__[name] = value.this if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown del value.thisown return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static) or hasattr(self,name) or (name == "thisown"): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self)def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0)def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,nameimport typestry: _object = types.ObjectType _newclass = 1except AttributeError: class _object : pass _newclass = 0del typesNULL = _libfann.NULLfann_create_neverused = _libfann.fann_create_neverusedfann_create_array = _libfann.fann_create_arrayfann_create_shortcut_neverused = _libfann.fann_create_shortcut_neverusedfann_create_shortcut_array = _libfann.fann_create_shortcut_arrayfann_run_old = _libfann.fann_run_oldfann_destroy = _libfann.fann_destroyfann_randomize_weights = _libfann.fann_randomize_weightsfann_init_weights = _libfann.fann_init_weightsfann_print_connections = _libfann.fann_print_connectionsfann_create_from_file = _libfann.fann_create_from_filefann_save = _libfann.fann_savefann_save_to_fixed = _libfann.fann_save_to_fixedfann_train = _libfann.fann_trainfann_test_old = _libfann.fann_test_oldfann_get_error = _libfann.fann_get_errorfann_get_MSE = _libfann.fann_get_MSEfann_reset_error = _libfann.fann_reset_errorfann_reset_MSE = _libfann.fann_reset_MSEfann_read_train_from_file = _libfann.fann_read_train_from_filefann_destroy_train = _libfann.fann_destroy_trainfann_train_epoch = _libfann.fann_train_epochfann_test_data = _libfann.fann_test_datafann_train_on_data = _libfann.fann_train_on_datafann_train_on_data_callback = _libfann.fann_train_on_data_callbackfann_train_on_file = _libfann.fann_train_on_filefann_train_on_file_callback = _libfann.fann_train_on_file_callbackfann_shuffle_train_data = _libfann.fann_shuffle_train_datafann_merge_train_data = _libfann.fann_merge_train_datafann_duplicate_train_data = _libfann.fann_duplicate_train_datafann_save_train = _libfann.fann_save_trainfann_save_train_to_fixed = _libfann.fann_save_train_to_fixedfann_print_parameters = _libfann.fann_print_parametersfann_get_training_algorithm = _libfann.fann_get_training_algorithmfann_set_training_algorithm = _libfann.fann_set_training_algorithmfann_get_learning_rate = _libfann.fann_get_learning_ratefann_set_learning_rate = _libfann.fann_set_learning_ratefann_get_activation_function_hidden = _libfann.fann_get_activation_function_hiddenfann_set_activation_function_hidden = _libfann.fann_set_activation_function_hiddenfann_get_activation_function_output = _libfann.fann_get_activation_function_outputfann_set_activation_function_output = _libfann.fann_set_activation_function_outputfann_get_activation_steepness_hidden = _libfann.fann_get_activation_steepness_hiddenfann_set_activation_steepness_hidden = _libfann.fann_set_activation_steepness_hiddenfann_get_activation_steepness_output = _libfann.fann_get_activation_steepness_outputfann_set_activation_steepness_output = _libfann.fann_set_activation_steepness_outputfann_get_activation_hidden_steepness = _libfann.fann_get_activation_hidden_steepnessfann_set_activation_hidden_steepness = _libfann.fann_set_activation_hidden_steepnessfann_get_activation_output_steepness = _libfann.fann_get_activation_output_steepnessfann_set_activation_output_steepness = _libfann.fann_set_activation_output_steepnessfann_set_train_error_function = _libfann.fann_set_train_error_functionfann_get_train_error_function = _libfann.fann_get_train_error_functionfann_get_quickprop_decay = _libfann.fann_get_quickprop_decayfann_set_quickprop_decay = _libfann.fann_set_quickprop_decayfann_get_quickprop_mu = _libfann.fann_get_quickprop_mufann_set_quickprop_mu = _libfann.fann_set_quickprop_mufann_get_rprop_increase_factor = _libfann.fann_get_rprop_increase_factorfann_set_rprop_increase_factor = _libfann.fann_set_rprop_increase_factorfann_get_rprop_decrease_factor = _libfann.fann_get_rprop_decrease_factorfann_set_rprop_decrease_factor = _libfann.fann_set_rprop_decrease_factorfann_get_rprop_delta_min = _libfann.fann_get_rprop_delta_minfann_set_rprop_delta_min = _libfann.fann_set_rprop_delta_minfann_get_rprop_delta_max = _libfann.fann_get_rprop_delta_maxfann_set_rprop_delta_max = _libfann.fann_set_rprop_delta_maxfann_get_num_input = _libfann.fann_get_num_inputfann_get_num_output = _libfann.fann_get_num_outputfann_get_total_neurons = _libfann.fann_get_total_neuronsfann_get_total_connections = _libfann.fann_get_total_connectionsfann_set_error_log = _libfann.fann_set_error_logfann_get_errno = _libfann.fann_get_errnofann_reset_errno = _libfann.fann_reset_errnofann_reset_errstr = _libfann.fann_reset_errstrfann_get_errstr = _libfann.fann_get_errstrfann_print_error = _libfann.fann_print_errorclass fann_neuron(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, fann_neuron, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, fann_neuron, name) def __repr__(self): return "<%s.%s; proxy of C fann_neuron instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) __swig_setmethods__["weights"] = _libfann.fann_neuron_weights_set __swig_getmethods__["weights"] = _libfann.fann_neuron_weights_get if _newclass:weights = property(_libfann.fann_neuron_weights_get, _libfann.fann_neuron_weights_set) __swig_setmethods__["connected_neurons"] = _libfann.fann_neuron_connected_neurons_set __swig_getmethods__["connected_neurons"] = _libfann.fann_neuron_connected_neurons_get if _newclass:connected_neurons = property(_libfann.fann_neuron_connected_neurons_get, _libfann.fann_neuron_connected_neurons_set) __swig_setmethods__["num_connections"] = _libfann.fann_neuron_num_connections_set __swig_getmethods__["num_connections"] = _libfann.fann_neuron_num_connections_get if _newclass:num_connections = property(_libfann.fann_neuron_num_connections_get, _libfann.fann_neuron_num_connections_set) __swig_setmethods__["value"] = _libfann.fann_neuron_value_set __swig_getmethods__["value"] = _libfann.fann_neuron_value_get if _newclass:value = property(_libfann.fann_neuron_value_get, _libfann.fann_neuron_value_set) def __init__(self, *args): _swig_setattr(self, fann_neuron, 'this', _libfann.new_fann_neuron(*args)) _swig_setattr(self, fann_neuron, 'thisown', 1) def __del__(self, destroy=_libfann.delete_fann_neuron): try: if self.thisown: destroy(self) except: passclass fann_neuronPtr(fann_neuron): def __init__(self, this): _swig_setattr(self, fann_neuron, 'this', this) if not hasattr(self,"thisown"): _swig_setattr(self, fann_neuron, 'thisown', 0) _swig_setattr(self, fann_neuron,self.__class__,fann_neuron)_libfann.fann_neuron_swigregister(fann_neuronPtr)class fann_layer(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, fann_layer, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, fann_layer, name) def __repr__(self): return "<%s.%s; proxy of C fann_layer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) __swig_setmethods__["first_neuron"] = _libfann.fann_layer_first_neuron_set __swig_getmethods__["first_neuron"] = _libfann.fann_layer_first_neuron_get if _newclass:first_neuron = property(_libfann.fann_layer_first_neuron_get, _libfann.fann_layer_first_neuron_set) __swig_setmethods__["last_neuron"] = _libfann.fann_layer_last_neuron_set __swig_getmethods__["last_neuron"] = _libfann.fann_layer_last_neuron_get if _newclass:last_neuron = property(_libfann.fann_layer_last_neuron_get, _libfann.fann_layer_last_neuron_set) def __init__(self, *args): _swig_setattr(self, fann_layer, 'this', _libfann.new_fann_layer(*args)) _swig_setattr(self, fann_layer, 'thisown', 1) def __del__(self, destroy=_libfann.delete_fann_layer): try: if self.thisown: destroy(self) except: passclass fann_layerPtr(fann_layer): def __init__(self, this): _swig_setattr(self, fann_layer, 'this', this) if not hasattr(self,"thisown"): _swig_setattr(self, fann_layer, 'thisown', 0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -