libcw/cwNN.h

60 lines
924 B
C
Raw Normal View History

//| Copyright: (C) 2020-2024 Kevin Larke <contact AT larke DOT org>
//| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
#ifndef cwNN_H
#define cwNN_H
namespace cw
{
namespace nn
{
typedef handle<struct nn_str> handle_t;
enum
{
kSigmoidActId,
kReluActId
};
enum
{
2020-10-30 13:40:39 +00:00
kInputLayerTId,
kDenseLayerTId,
kConv1DConvTId
};
enum
{
kZeroInitId,
kUniformInitId,
kNormalInitId
};
2020-10-30 13:40:39 +00:00
typedef struct train_args_str
{
2020-10-30 13:40:39 +00:00
unsigned epochN;
unsigned batchN;
double eta;
double lambda;
} train_args_t;
2020-10-30 13:40:39 +00:00
rc_t create( handle_t& h, const object_t& cfg );
rc_t destroy( handle_t& h );
2020-10-30 13:40:39 +00:00
rc_t train( handle_t h, dataset::handle_t dsH, const train_args_t& args );
rc_t test( handle_t h, dataset::handle_t dsH );
2020-10-30 13:40:39 +00:00
rc_t test( const char* mnistDir );
}
}
#endif