Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyAM committed Jul 16, 2024
2 parents 2ed3014 + cac0e46 commit 0e5f526
Show file tree
Hide file tree
Showing 61 changed files with 121,057 additions and 120,144 deletions.
2 changes: 0 additions & 2 deletions blank/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ int main()
{
cout << "Blank\n";



cout << "Bye!" << endl;

return 0;
Expand Down
4 changes: 2 additions & 2 deletions examples/airfoil_self_noise/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int main()
testing_analysis.print_goodness_of_fit_analysis();

// Save results

neural_network.save("../data/neural_network.xml");
neural_network.save_expression_c("../data/airfoil_self_noise.c");

Expand All @@ -77,7 +77,7 @@ int main()
// const Tensor<type, 2> outputs = new_neural_network.calculate_outputs(inputs);

// cout << outputs << endl;

cout << "Good bye!" << endl;

return 0;
Expand Down
237,930 changes: 118,965 additions & 118,965 deletions examples/translation/data/ENtoES_dataset_data.txt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions opennn/batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void Batch::perform_augmentation() const

if(random_rotation_minimum != 0 && random_rotation_maximum != 0)
{
const type angle = (random_rotation_minimum < random_rotation_maximum)
const type angle = random_rotation_minimum < random_rotation_maximum
? random_rotation_minimum + type(rand())
: random_rotation_maximum;

Expand All @@ -89,7 +89,7 @@ void Batch::perform_augmentation() const

if(random_rescaling_minimum != 0 && random_rescaling_maximum != 0)
{
const type rescaling = (random_rescaling_minimum < random_rescaling_maximum)
const type rescaling = random_rescaling_minimum < random_rescaling_maximum
? random_rescaling_minimum + type(rand())
: random_rescaling_maximum;

Expand All @@ -98,7 +98,7 @@ void Batch::perform_augmentation() const

if(random_horizontal_translation_minimum != 0 && random_horizontal_translation_maximum != 0)
{
const type translation = (random_horizontal_translation_minimum < random_rescaling_maximum)
const type translation = random_horizontal_translation_minimum < random_rescaling_maximum
? random_horizontal_translation_minimum + type(rand())
: random_rescaling_maximum;

Expand Down
2 changes: 1 addition & 1 deletion opennn/bounding_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ void BoundingLayer::write_XML(tinyxml2::XMLPrinter& file_stream) const
{
file_stream.OpenElement("Item");

file_stream.PushAttribute("Index", static_cast<unsigned>(i+1));
file_stream.PushAttribute("Index", unsigned(i+1));

// Lower bound

Expand Down
10 changes: 5 additions & 5 deletions opennn/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <algorithm>
#include <execution>

#define OPENNN_CUDA
//#define OPENNN_CUDA
#ifdef OPENNN_CUDA

#include "../../opennn_cuda/CudaOpennn/kernel.cuh"
Expand All @@ -45,20 +45,20 @@

namespace opennn
{
//using namespace std;
using namespace std;
using namespace Eigen;

using type = float;

using dimensions = std::vector<Index>;
using dimensions = vector<Index>;

//using execution_policy = std::execution::par;

template<typename Base, typename T>
inline bool is_instance_of(const T* ptr) {
inline bool is_instance_of(const T* ptr)
{
return dynamic_cast<const Base*>(ptr) != nullptr;
}

}


Expand Down
4 changes: 2 additions & 2 deletions opennn/convolutional_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ void ConvolutionalLayer::back_propagate(const Tensor<pair<type*, dimensions>, 1>

Tensor<type, 1>& biases_derivatives = convolutional_layer_back_propagation->biases_derivatives;

Eigen::array<Eigen::Index, 4> offsets;
Eigen::array<Eigen::Index, 4> extents;
Eigen::array<Index, 4> offsets;
Eigen::array<Index, 4> extents;

// Synaptic weights derivatives

Expand Down
4 changes: 2 additions & 2 deletions opennn/correlations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ pair<Tensor<type, 2>, Tensor<type, 2>> filter_missing_values_matrix_matrix(const
Tensor<type, 2> get_correlation_values(const Tensor<Correlation, 2>& correlations)
{
Tensor<type, 2> values;
/**
/*
const Index rows_number = correlations.dimension(0);
const Index raw_variables_number = correlations.dimension(1);
Tensor<type, 2> values(rows_number, raw_variables_number);
Expand Down Expand Up @@ -922,7 +922,7 @@ Correlation logistic_correlation_vector_vector_spearman(const ThreadPoolDevice*
correlation.r = linear_correlation(thread_pool_device, outputs.reshape(vector), targets.reshape(vector)).r;

const type z_correlation = r_correlation_to_z_correlation(correlation.r);
/**
/*
const Tensor<type, 1> confidence_interval_z = confidence_interval_z_correlation(z_correlation, inputs_dimensions(0));
correlation.lower_confidence = z_correlation_to_r_correlation(confidence_interval_z(0));
Expand Down
6 changes: 0 additions & 6 deletions opennn/cross_entropy_error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ void CrossEntropyError::calculate_binary_output_delta(const Batch& batch,
const ProbabilisticLayerForwardPropagation* probabilistic_layer_forward_propagation
= static_cast<ProbabilisticLayerForwardPropagation*>(forward_propagation.layers(last_trainable_layer_index));

ProbabilisticLayerBackPropagation* probabilistic_layer_back_propagation
= static_cast<ProbabilisticLayerBackPropagation*>(back_propagation.neural_network.layers(last_trainable_layer_index));

const Tensor<type, 2>& outputs = probabilistic_layer_forward_propagation->outputs;

// Back propagation
Expand All @@ -189,9 +186,6 @@ void CrossEntropyError::calculate_multiple_output_delta(const Batch& batch,
{
const Index last_trainable_layer_index = neural_network->get_last_trainable_layer_index();

ProbabilisticLayerBackPropagation* probabilistic_layer_back_propagation
= static_cast<ProbabilisticLayerBackPropagation*>(back_propagation.neural_network.layers(last_trainable_layer_index));

const Index batch_samples_number = batch.get_batch_samples_number();

const pair<type*, dimensions> targets_pair = batch.get_targets_pair();
Expand Down
Loading

0 comments on commit 0e5f526

Please sign in to comment.