Class: CNTK::TrainingParameterPerMinibatchSchedule
- Inherits:
-
((swig_class *) SWIGTYPE_p_CNTK__TrainingParameterScheduleT_double_t->clientdata)->klass
- Object
- ((swig_class *) SWIGTYPE_p_CNTK__TrainingParameterScheduleT_double_t->clientdata)->klass
- CNTK::TrainingParameterPerMinibatchSchedule
- 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
54632 54633 54634 54635 54636 54637 54638 54639 54640 54641 54642 54643 54644 54645 54646 54647 54648 54649 54650 54651 54652 54653 54654 54655 54656 54657 54658 54659 54660 54661 54662 54663 54664 54665 54666 54667 54668 54669 54670 54671 54672 54673 54674 54675 54676 54677 54678 54679 54680 54681 54682 54683 54684 54685 54686 54687 54688 54689 54690 54691 54692 54693 54694 54695 54696 54697 54698 54699 54700 54701 54702 54703 54704 54705 54706 54707 54708 |
# File 'ext/cntk/cntk_wrap.cxx', line 54632
SWIGINTERN VALUE _wrap_new_TrainingParameterPerMinibatchSchedule(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_TrainingParameterPerMinibatchSchedule__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_TrainingParameterPerMinibatchSchedule__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_TrainingParameterPerMinibatchSchedule__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_TrainingParameterPerMinibatchSchedule__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_TrainingParameterPerMinibatchSchedule__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.
54720 54721 54722 54723 54724 54725 54726 54727 54728 54729 54730 54731 54732 54733 54734 54735 54736 54737 54738 54739 54740 54741 54742 54743 54744 54745 54746 54747 54748 54749 54750 54751 54752 54753 54754 54755 54756 54757 54758 54759 54760 54761 54762 54763 54764 54765 |
# File 'ext/cntk/cntk_wrap.cxx', line 54720
SWIGINTERN VALUE
_wrap_TrainingParameterPerMinibatchSchedule___getitem__(int argc, VALUE *argv, VALUE self) {
CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *arg1 = (CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *) 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__Minibatch_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *","__getitem__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > * >(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;
}
|