Class: CNTK::MinibatchInfo
- Inherits:
-
Object
- Object
- CNTK::MinibatchInfo
- Defined in:
- ext/cntk/cntk_wrap.cxx
Instance Method Summary collapse
- #at_end_of_data(*args) ⇒ Object
- #at_end_of_data=(*args) ⇒ Object
- #eval_criterion_value(*args) ⇒ Object
- #eval_criterion_value=(*args) ⇒ Object
- #initialize(*args) ⇒ Object constructor
- #is_empty(*args) ⇒ Object
- #number_of_samples(*args) ⇒ Object
- #number_of_samples=(*args) ⇒ Object
- #training_loss_value(*args) ⇒ Object
- #training_loss_value=(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Object
17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 |
# File 'ext/cntk/cntk_wrap.cxx', line 17921
SWIGINTERN VALUE
_wrap_new_MinibatchInfo(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
try {
result = (CNTK::MinibatchInfo *)new CNTK::MinibatchInfo();
DATA_PTR(self) = result;
}
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");
}
}
return self;
fail:
return Qnil;
}
|
Instance Method Details
#at_end_of_data(*args) ⇒ Object
17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 |
# File 'ext/cntk/cntk_wrap.cxx', line 17653
SWIGINTERN VALUE
_wrap_MinibatchInfo_at_end_of_data_get(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
bool result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CNTK__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","atEndOfData", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
result = (bool) ((arg1)->atEndOfData);
vresult = SWIG_From_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#at_end_of_data=(*args) ⇒ Object
17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 |
# File 'ext/cntk/cntk_wrap.cxx', line 17624
SWIGINTERN VALUE
_wrap_MinibatchInfo_at_end_of_data_set(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
bool arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
bool val2 ;
int ecode2 = 0 ;
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__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","atEndOfData", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
ecode2 = SWIG_AsVal_bool(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","atEndOfData", 2, argv[0] ));
}
arg2 = static_cast< bool >(val2);
if (arg1) (arg1)->atEndOfData = arg2;
return Qnil;
fail:
return Qnil;
}
|
#eval_criterion_value(*args) ⇒ Object
17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 17849 17850 17851 17852 17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 |
# File 'ext/cntk/cntk_wrap.cxx', line 17839
SWIGINTERN VALUE
_wrap_MinibatchInfo_eval_criterion_value_get(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
CNTK::NDArrayViewPtr *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CNTK__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","evalCriterionValue", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
result = (CNTK::NDArrayViewPtr *) & ((arg1)->evalCriterionValue);
{
std::shared_ptr< CNTK::NDArrayView > *smartresult = *result ? new std::shared_ptr< CNTK::NDArrayView >(*result) : 0;
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_CNTK__NDArrayView_t, SWIG_POINTER_OWN);
}
return vresult;
fail:
return Qnil;
}
|
#eval_criterion_value=(*args) ⇒ Object
17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 |
# File 'ext/cntk/cntk_wrap.cxx', line 17798
SWIGINTERN VALUE
_wrap_MinibatchInfo_eval_criterion_value_set(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
CNTK::NDArrayViewPtr *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
CNTK::NDArrayViewPtr tempshared2 ;
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__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","evalCriterionValue", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
{
swig_ruby_owntype newmem = {
0, 0
};
res2 = SWIG_ConvertPtrAndOwn(argv[0], &argp2, SWIGTYPE_p_std__shared_ptrT_CNTK__NDArrayView_t, 0 , &newmem);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CNTK::NDArrayViewPtr const &","evalCriterionValue", 2, argv[0] ));
}
if (newmem.own & SWIG_CAST_NEW_MEMORY) {
if (argp2) tempshared2 = *reinterpret_cast< CNTK::NDArrayViewPtr * >(argp2);
delete reinterpret_cast< CNTK::NDArrayViewPtr * >(argp2);
arg2 = &tempshared2;
} else {
arg2 = (argp2) ? reinterpret_cast< CNTK::NDArrayViewPtr * >(argp2) : &tempshared2;
}
}
if (arg1) (arg1)->evalCriterionValue = *arg2;
return Qnil;
fail:
return Qnil;
}
|
#is_empty(*args) ⇒ Object
17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 |
# File 'ext/cntk/cntk_wrap.cxx', line 17866
SWIGINTERN VALUE
_wrap_MinibatchInfo_is_empty(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
bool result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CNTK__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","IsEmpty", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
{
try {
result = (bool)(arg1)->IsEmpty();
}
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_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#number_of_samples(*args) ⇒ Object
17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 |
# File 'ext/cntk/cntk_wrap.cxx', line 17706
SWIGINTERN VALUE
_wrap_MinibatchInfo_number_of_samples_get(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CNTK__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","numberOfSamples", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
result = ((arg1)->numberOfSamples);
vresult = SWIG_From_size_t(static_cast< size_t >(result));
return vresult;
fail:
return Qnil;
}
|
#number_of_samples=(*args) ⇒ Object
17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 |
# File 'ext/cntk/cntk_wrap.cxx', line 17677
SWIGINTERN VALUE
_wrap_MinibatchInfo_number_of_samples_set(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
size_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t val2 ;
int ecode2 = 0 ;
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__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","numberOfSamples", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","numberOfSamples", 2, argv[0] ));
}
arg2 = static_cast< size_t >(val2);
if (arg1) (arg1)->numberOfSamples = arg2;
return Qnil;
fail:
return Qnil;
}
|
#training_loss_value(*args) ⇒ Object
17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 |
# File 'ext/cntk/cntk_wrap.cxx', line 17771
SWIGINTERN VALUE
_wrap_MinibatchInfo_training_loss_value_get(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
CNTK::NDArrayViewPtr *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CNTK__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","trainingLossValue", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
result = (CNTK::NDArrayViewPtr *) & ((arg1)->trainingLossValue);
{
std::shared_ptr< CNTK::NDArrayView > *smartresult = *result ? new std::shared_ptr< CNTK::NDArrayView >(*result) : 0;
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_CNTK__NDArrayView_t, SWIG_POINTER_OWN);
}
return vresult;
fail:
return Qnil;
}
|
#training_loss_value=(*args) ⇒ Object
17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 |
# File 'ext/cntk/cntk_wrap.cxx', line 17730
SWIGINTERN VALUE
_wrap_MinibatchInfo_training_loss_value_set(int argc, VALUE *argv, VALUE self) {
CNTK::MinibatchInfo *arg1 = (CNTK::MinibatchInfo *) 0 ;
CNTK::NDArrayViewPtr *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
CNTK::NDArrayViewPtr tempshared2 ;
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__MinibatchInfo, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::MinibatchInfo *","trainingLossValue", 1, self ));
}
arg1 = reinterpret_cast< CNTK::MinibatchInfo * >(argp1);
{
swig_ruby_owntype newmem = {
0, 0
};
res2 = SWIG_ConvertPtrAndOwn(argv[0], &argp2, SWIGTYPE_p_std__shared_ptrT_CNTK__NDArrayView_t, 0 , &newmem);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CNTK::NDArrayViewPtr const &","trainingLossValue", 2, argv[0] ));
}
if (newmem.own & SWIG_CAST_NEW_MEMORY) {
if (argp2) tempshared2 = *reinterpret_cast< CNTK::NDArrayViewPtr * >(argp2);
delete reinterpret_cast< CNTK::NDArrayViewPtr * >(argp2);
arg2 = &tempshared2;
} else {
arg2 = (argp2) ? reinterpret_cast< CNTK::NDArrayViewPtr * >(argp2) : &tempshared2;
}
}
if (arg1) (arg1)->trainingLossValue = *arg2;
return Qnil;
fail:
return Qnil;
}
|