-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from cvjena/releasing_v2.0.0
Pull Changes for v2.0.0
- Loading branch information
Showing
57 changed files
with
3,584 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef CONV_SKIPLAYERNETWORKFACTORY_H | ||
#define CONV_SKIPLAYERNETWORKFACTORY_H | ||
|
||
#include <iostream> | ||
|
||
#include "../net/Net.h" | ||
#include "../net/NetGraph.h" | ||
#include "../net/Trainer.h" | ||
#include "../util/Dataset.h" | ||
#include "../util/Log.h" | ||
#include "ConfigurableFactory.h" | ||
|
||
namespace Conv { | ||
|
||
class SkipLayerNetworkFactory : public Factory { | ||
int AddLayers(Net& net, Connection data_layer_connection, const unsigned int output_classes, bool add_loss_layer = false, std::ostream& graph_output = std::cout); | ||
bool AddLayers(NetGraph& graph, NetGraphConnection data_layer_connection, const unsigned int output_classes, bool add_loss_layer = false); | ||
int patchsizex(); | ||
int patchsizey(); | ||
Layer* CreateLossLayer(const unsigned int output_classes, const datum loss_weight = 1.0); | ||
void InitOptimalSettings(); | ||
TrainerSettings optimal_settings() const; | ||
Method method() const; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* This file is part of the CN24 semantic segmentation software, | ||
* copyright (C) 2015 Clemens-Alexander Brust (ikosa dot de at gmail dot com). | ||
* | ||
* For licensing information, see the LICENSE file included with this project. | ||
*/ | ||
/** | ||
* @file InputDownSamplingLayer.h | ||
* @class InputDownSamplingLayer | ||
* @brief Layer that scales input down | ||
* | ||
* @author Clemens-Alexander Brust (ikosa dot de at gmail dot com) | ||
*/ | ||
|
||
#ifndef CONV_INPUTDOWNSAMPLINGLAYER_H | ||
#define CONV_INPUTDOWNSAMPLINGLAYER_H | ||
|
||
#include <string> | ||
#include <sstream> | ||
|
||
#include "SimpleLayer.h" | ||
|
||
|
||
namespace Conv { | ||
|
||
class InputDownSamplingLayer : public SimpleLayer { | ||
public: | ||
/** | ||
* @brief Constructs a max-pooling Layer. | ||
* | ||
* @param region_width Width of the pooling regions | ||
* @param region_height Height of the pooling regions | ||
*/ | ||
InputDownSamplingLayer(const unsigned int region_width, | ||
const unsigned int region_height); | ||
|
||
// Implementations for SimpleLayer | ||
bool CreateOutputs (const std::vector< CombinedTensor* >& inputs, std::vector< CombinedTensor* >& outputs); | ||
bool Connect (const CombinedTensor* input, CombinedTensor* output); | ||
void FeedForward(); | ||
void BackPropagate(); | ||
|
||
inline unsigned int Gain() { | ||
return gain / (region_width_ * region_height_); | ||
} | ||
|
||
inline std::string GetLayerDescription() { | ||
std::ostringstream ss; | ||
ss << "Input Down-Sampling Layer (" << region_width_ << "x" << region_height_ << ")"; | ||
return ss.str(); | ||
} | ||
|
||
bool IsOpenCLAware(); | ||
private: | ||
// Settings | ||
unsigned int region_width_ = 0; | ||
unsigned int region_height_ = 0; | ||
|
||
// Feature map dimensions | ||
unsigned int input_width_ = 0; | ||
unsigned int input_height_ = 0; | ||
unsigned int output_width_ = 0; | ||
unsigned int output_height_ = 0; | ||
|
||
unsigned int maps_ = 0; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.