Skip to content

Commit

Permalink
Resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvaro7941 committed Dec 4, 2023
2 parents 6b22b69 + 201a5d7 commit 4708cac
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 10 deletions.
35 changes: 33 additions & 2 deletions opennn/dynamic_tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,26 @@ class DynamicTensor {
{
// const Tensor<bool, 0> different_dimensions = (dimensions != other.dimensions).all();

// if(different_dimensions(0))
bool different_dimensions = false;

if(dimensions.size() != other.dimensions.size())
{
different_dimensions = true;
}

if(!different_dimensions)
{
for(Index i = 0; i < dimensions.size(); i++)
{
if(dimensions(i) != other.dimensions(i))
{
different_dimensions = true;
break;
}
}
}

if(different_dimensions)
{
dimensions = other.dimensions;
}
Expand All @@ -77,11 +96,23 @@ class DynamicTensor {

bool operator != (DynamicTensor& other)
{
// if((dimensions != other.dimensions)(0))

// if(!(dimensions == other.dimensions).all()(0))
// {
// return true;
// }

if(dimensions.size() != other.dimensions.size())
{
return true;
}

for(Index i = 0; i < dimensions.size(); i++)
{
if(dimensions(i) != other.dimensions(i))
return true;
}

const Tensor<Index, 0> size = dimensions.prod();

for(Index i = 0; i < size(0); i++)
Expand Down
4 changes: 2 additions & 2 deletions opennn/kmeans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

#include "../../opennn/opennn/opennn.h"

using namespace OpenNN;
using namespace opennn;

namespace OpenNN
namespace opennn
{


Expand Down
6 changes: 1 addition & 5 deletions opennn/kmeans.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@

// System includes

//#include <iostream>
//#include <fstream>
//#include <sstream>
//#include <string>
//#include <cstring>
//#include <time.h>
//#include <omp.h>
//#include <Eigen/Dense>
//#include "unsupported/Eigen/CXX11/Tensor"
//#include "config.h"

// OpenNN includes

Expand All @@ -50,7 +46,7 @@ using opennn::type;
using Eigen::Index;
using namespace std;

namespace OpenNN
namespace opennn
{

class KMeans
Expand Down
1 change: 0 additions & 1 deletion opennn/tensor_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#define GET_VARIABLE_NAME(Variable) (#Variable)


namespace opennn
{

Expand Down
4 changes: 4 additions & 0 deletions opennn/tensor_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
#include <vector>
#include <numeric>
#include <stdio.h>
<<<<<<< HEAD
//#include <statistics.h>
=======
>>>>>>> 201a5d775f04a2bcf0df2e97242cffcc75575a1e

// OpenNN includes

#include "config.h"
#include "opennn_strings.h"
#include "statistics.h"

#include "../eigen/unsupported/Eigen/KroneckerProduct"

Expand Down

0 comments on commit 4708cac

Please sign in to comment.