|
template<typename T , typename DenseType > |
void | loadDense (DenseType &dense, const nlohmann::json &weights) |
| Loads weights for a Dense (or DenseT) layer from a json representation of the layer weights. More...
|
|
template<typename T > |
std::unique_ptr< Dense< T > > | createDense (int in_size, int out_size, const nlohmann::json &weights) |
| Creates a Dense layer from a json representation of the layer weights. More...
|
|
template<typename T , typename DenseType > |
bool | checkDense (const DenseType &dense, const std::string &type, int layerDims, const bool debug) |
| Checks that a Dense (or DenseT) layer has the given dimensions. More...
|
|
template<typename T , typename Conv1DType > |
void | loadConv1D (Conv1DType &conv, int kernel_size, int, const nlohmann::json &weights) |
| Loads weights for a Conv1D (or Conv1DT) layer from a json representation of the layer weights. More...
|
|
template<typename T , typename Conv2DType > |
void | loadConv2D (Conv2DType &conv2d, const nlohmann::json &weights) |
| Loads weights for a Conv2D (or Conv2DT) layer from a json representation of the layer weights. More...
|
|
template<typename T > |
std::unique_ptr< Conv1D< T > > | createConv1D (int in_size, int out_size, int kernel_size, int dilation, int groups, const nlohmann::json &weights) |
| Creates a Conv1D layer from a json representation of the layer weights. More...
|
|
template<typename T , typename Conv1DType > |
bool | checkConv1D (const Conv1DType &conv, const std::string &type, int layerDims, int kernel_size, int dilation_rate, int groups, const bool debug) |
| Checks that a Conv1D (or Conv1DT) layer has the given dimensions. More...
|
|
template<typename T > |
std::unique_ptr< Conv2D< T > > | createConv2D (int num_filters_in, int num_features_in, int num_filters_out, int kernel_size_time, int kernel_size_feature, int dilation, int stride, bool valid_pad, const nlohmann::json &weights) |
|
template<typename T , typename Conv2DType > |
bool | checkConv2D (const Conv2DType &conv, const std::string &type, int layerDims, int kernel_size_time, int kernel_size_feature, int dilation_rate, int stride, bool, const bool debug) |
| Checks that a Conv2D (or Conv2DT) layer has the given dimensions. More...
|
|
template<typename T , typename GRUType > |
void | loadGRU (GRUType &gru, const nlohmann::json &weights) |
| Loads weights for a GRULayer (or GRULayerT) from a json representation of the layer weights. More...
|
|
template<typename T > |
std::unique_ptr< GRULayer< T > > | createGRU (int in_size, int out_size, const nlohmann::json &weights) |
| Creates a GRULayer from a json representation of the layer weights. More...
|
|
template<typename T , typename GRUType > |
bool | checkGRU (const GRUType &gru, const std::string &type, int layerDims, const bool debug) |
| Checks that a GRULayer (or GRULayerT) has the given dimensions. More...
|
|
template<typename T , typename LSTMType > |
void | loadLSTM (LSTMType &lstm, const nlohmann::json &weights) |
| Loads weights for a LSTMLayer (or LSTMLayerT) from a json representation of the layer weights. More...
|
|
template<typename T > |
std::unique_ptr< LSTMLayer< T > > | createLSTM (int in_size, int out_size, const nlohmann::json &weights) |
| Creates a LSTMLayer from a json representation of the layer weights. More...
|
|
template<typename T , typename LSTMType > |
bool | checkLSTM (const LSTMType &lstm, const std::string &type, int layerDims, const bool debug) |
| Checks that a LSTMLayer (or LSTMLayerT) has the given dimensions. More...
|
|
template<typename T , typename PReLUType > |
void | loadPReLU (PReLUType &prelu, const nlohmann::json &weights) |
| Loads weights for a PReLUActivation (or PReLUActivationT) from a json representation of the layer weights. More...
|
|
template<typename T > |
std::unique_ptr< PReLUActivation< T > > | createPReLU (int in_size, const nlohmann::json &weights) |
| Creates a PReLUActivation from a json representation of the layer weights. More...
|
|
template<typename T , typename PReLUType > |
bool | checkPReLU (const PReLUType &prelu, const std::string &type, int layerDims, const bool debug) |
| Checks that a PReLUActivation (or PReLUActivationT) has the given dimensions. More...
|
|
template<typename T , typename BatchNormType > |
void | loadBatchNorm (BatchNormType &batch_norm, const nlohmann::json &weights, bool affine) |
| Loads weights for a BatchNorm1DLayer (or BatchNorm1DT) or BatchNorm2DLayer (or BatchNorm2DT) from a json representation of the layer weights. More...
|
|
template<typename T , typename BatchNormType > |
void | loadBatchNorm (BatchNormType &batch_norm, const nlohmann::json &weights) |
| Loads weights for a BatchNorm1DLayer (or BatchNorm1DT) from a json representation of the layer weights. More...
|
|
template<typename T > |
std::unique_ptr< BatchNorm1DLayer< T > > | createBatchNorm (int size, const nlohmann::json &weights, T epsilon) |
| Creates a BatchNorm1DLayer from a json representation of the layer weights. More...
|
|
template<typename T > |
std::unique_ptr< BatchNorm2DLayer< T > > | createBatchNorm2D (int num_filters_in, int num_features_in, const nlohmann::json &weights, T epsilon) |
|
template<typename T , typename BatchNormType > |
bool | checkBatchNorm (const BatchNormType &batch_norm, const std::string &type, int layerDims, const nlohmann::json &weights, const bool debug) |
| Checks that a BatchNorm1DLayer (or BatchNorm1DT) has the given dimensions. More...
|
|
template<typename T , typename BatchNormType > |
bool | checkBatchNorm2D (const BatchNormType &batch_norm, const std::string &type, int layerDims, const nlohmann::json &weights, const bool debug) |
| Checks that a BatchNorm2DLayer (or BatchNorm2DT) has the given dimensions. More...
|
|
template<typename T > |
std::unique_ptr< Activation< T > > | createActivation (const std::string &activationType, int dims) |
| Creates an activation layer of a given type. More...
|
|
template<typename LayerType > |
bool | checkActivation (const LayerType &actLayer, const std::string &activationType, int dims, const bool debug) |
| Checks that an Activation layer has the given dimensions. More...
|
|
template<typename T > |
std::unique_ptr< Model< T > > | parseJson (const nlohmann::json &parent, const bool debug=false) |
| Creates a neural network model from a json stream. More...
|
|
template<typename T > |
std::unique_ptr< Model< T > > | parseJson (std::ifstream &jsonStream, const bool debug=false) |
| Creates a neural network model from a json stream. More...
|
|
Utility functions for loading model weights from their json representation.