Class: CNTK::TrainingParameterPerSampleSchedule
- Inherits:
-
((swig_class *) SWIGTYPE_p_CNTK__TrainingParameterScheduleT_double_t->clientdata)->klass
- Object
- ((swig_class *) SWIGTYPE_p_CNTK__TrainingParameterScheduleT_double_t->clientdata)->klass
- CNTK::TrainingParameterPerSampleSchedule
- Defined in:
- ext/cntk/cntk_wrap.cxx
Instance Method Summary collapse
-
#[](*args) ⇒ Object
call-seq: [](count) -> double const.
- #initialize(*args, self) ⇒ Object constructor
Constructor Details
#initialize(*args, self) ⇒ Object
54242 54243 54244 54245 54246 54247 54248 54249 54250 54251 54252 54253 54254 54255 54256 54257 54258 54259 54260 54261 54262 54263 54264 54265 54266 54267 54268 54269 54270 54271 54272 54273 54274 54275 54276 54277 54278 54279 54280 54281 54282 54283 54284 54285 54286 54287 54288 54289 54290 54291 54292 54293 54294 54295 54296 54297 54298 54299 54300 54301 54302 54303 54304 54305 54306 54307 54308 54309 54310 54311 54312 54313 54314 54315 54316 54317 54318 |
# File 'ext/cntk/cntk_wrap.cxx', line 54242
SWIGINTERN VALUE _wrap_new_TrainingParameterPerSampleSchedule(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[2];
int ii;
argc = nargs;
if (argc > 2) SWIG_fail;
for (ii = 0; (ii < argc); ++ii) {
argv[ii] = args[ii];
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_TrainingParameterPerSampleSchedule__SWIG_4(nargs, args, self);
}
}
if (argc == 1) {
int _v;
{
int res = SWIG_AsVal_double(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_TrainingParameterPerSampleSchedule__SWIG_0(nargs, args, self);
}
}
if (argc == 1) {
int _v;
int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_TrainingParameterPerSampleSchedule__SWIG_2(nargs, args, self);
}
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_size_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_TrainingParameterPerSampleSchedule__SWIG_3(nargs, args, self);
}
}
}
if (argc == 2) {
int _v;
int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_size_t(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_TrainingParameterPerSampleSchedule__SWIG_1(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 2, "TrainingParameterPerUnitSchedule.new",
" TrainingParameterPerUnitSchedule.new(double value)\n"
" TrainingParameterPerUnitSchedule.new(std::vector< double,std::allocator< double > > const &schedule, size_t epochSize)\n"
" TrainingParameterPerUnitSchedule.new(std::vector< double,std::allocator< double > > const &schedule)\n"
" TrainingParameterPerUnitSchedule.new(std::vector< std::pair< size_t,double >,std::allocator< std::pair< size_t,double > > > const &schedule, size_t epochSize)\n"
" TrainingParameterPerUnitSchedule.new(std::vector< std::pair< size_t,double >,std::allocator< std::pair< size_t,double > > > const &schedule)\n");
return Qnil;
}
|
Instance Method Details
#[](*args) ⇒ Object
call-seq:
[](count) -> double const
Element accessor/slicing.
54330 54331 54332 54333 54334 54335 54336 54337 54338 54339 54340 54341 54342 54343 54344 54345 54346 54347 54348 54349 54350 54351 54352 54353 54354 54355 54356 54357 54358 54359 54360 54361 54362 54363 54364 54365 54366 54367 54368 54369 54370 54371 54372 54373 54374 54375 |
# File 'ext/cntk/cntk_wrap.cxx', line 54330
SWIGINTERN VALUE
_wrap_TrainingParameterPerSampleSchedule___getitem__(int argc, VALUE *argv, VALUE self) {
CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Sample > *arg1 = (CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Sample > *) 0 ;
size_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t val2 ;
int ecode2 = 0 ;
double result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CNTK__TrainingParameterPerUnitScheduleT_double_CNTK__TrainingParameterScheduleT_double_t__UnitType__Sample_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Sample > *","__getitem__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Sample > * >(argp1);
ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","__getitem__", 2, argv[0] ));
}
arg2 = static_cast< size_t >(val2);
{
try {
result = (double)(arg1)->__getitem__(arg2);
}
catch (const std::runtime_error &e) {
SWIG_exception(SWIG_RuntimeError,e.what());
}
catch (const std::invalid_argument &e) {
SWIG_exception(SWIG_ValueError,e.what());
}
catch (const std::logic_error &e) {
SWIG_exception(SWIG_RuntimeError,e.what());
}
catch (...) {
SWIG_exception(SWIG_UnknownError,"Runtime exception");
}
}
vresult = SWIG_From_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|