Class: CNTK::AdditionalLearningOptions

Inherits:
Object
  • Object
show all
Defined in:
ext/cntk/cntk_wrap.cxx

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



55389
55390
55391
55392
55393
55394
55395
55396
55397
55398
55399
55400
55401
55402
55403
55404
55405
55406
55407
55408
55409
55410
55411
55412
55413
55414
55415
55416
55417
# File 'ext/cntk/cntk_wrap.cxx', line 55389

SWIGINTERN VALUE
_wrap_new_AdditionalLearningOptions(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  {
    try {
      result = (CNTK::AdditionalLearningOptions *)new CNTK::AdditionalLearningOptions();
      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

#gaussian_noise_injection_std_dev(*args) ⇒ Object



55244
55245
55246
55247
55248
55249
55250
55251
55252
55253
55254
55255
55256
55257
55258
55259
55260
55261
55262
55263
55264
55265
# File 'ext/cntk/cntk_wrap.cxx', line 55244

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_gaussian_noise_injection_std_dev_get(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","gaussianNoiseInjectionStdDev", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  result = (CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *)& ((arg1)->gaussianNoiseInjectionStdDev);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CNTK__TrainingParameterPerUnitScheduleT_double_CNTK__TrainingParameterScheduleT_double_t__UnitType__Minibatch_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#gaussian_noise_injection_std_dev=(*args) ⇒ Object



55215
55216
55217
55218
55219
55220
55221
55222
55223
55224
55225
55226
55227
55228
55229
55230
55231
55232
55233
55234
55235
55236
55237
55238
55239
55240
55241
# File 'ext/cntk/cntk_wrap.cxx', line 55215

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_gaussian_noise_injection_std_dev_set(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *arg2 = (CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","gaussianNoiseInjectionStdDev", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_CNTK__TrainingParameterPerUnitScheduleT_double_CNTK__TrainingParameterScheduleT_double_t__UnitType__Minibatch_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > *","gaussianNoiseInjectionStdDev", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< CNTK::TrainingParameterPerUnitSchedule< double,CNTK::TrainingParameterSchedule< double >::UnitType::Minibatch > * >(argp2);
  if (arg1) (arg1)->gaussianNoiseInjectionStdDev = *arg2;
  return Qnil;
fail:
  return Qnil;
}

#gradient_clipping_threshold_per_sample(*args) ⇒ Object



55297
55298
55299
55300
55301
55302
55303
55304
55305
55306
55307
55308
55309
55310
55311
55312
55313
55314
55315
55316
55317
55318
# File 'ext/cntk/cntk_wrap.cxx', line 55297

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_gradient_clipping_threshold_per_sample_get(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","gradientClippingThresholdPerSample", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  result = (double) ((arg1)->gradientClippingThresholdPerSample);
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}

#gradient_clipping_threshold_per_sample=(*args) ⇒ Object



55268
55269
55270
55271
55272
55273
55274
55275
55276
55277
55278
55279
55280
55281
55282
55283
55284
55285
55286
55287
55288
55289
55290
55291
55292
55293
55294
# File 'ext/cntk/cntk_wrap.cxx', line 55268

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_gradient_clipping_threshold_per_sample_set(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","gradientClippingThresholdPerSample", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","gradientClippingThresholdPerSample", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->gradientClippingThresholdPerSample = arg2;
  return Qnil;
fail:
  return Qnil;
}

#gradient_clipping_with_truncation(*args) ⇒ Object



55350
55351
55352
55353
55354
55355
55356
55357
55358
55359
55360
55361
55362
55363
55364
55365
55366
55367
55368
55369
55370
55371
# File 'ext/cntk/cntk_wrap.cxx', line 55350

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_gradient_clipping_with_truncation_get(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","gradientClippingWithTruncation", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  result = (bool) ((arg1)->gradientClippingWithTruncation);
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#gradient_clipping_with_truncation=(*args) ⇒ Object



55321
55322
55323
55324
55325
55326
55327
55328
55329
55330
55331
55332
55333
55334
55335
55336
55337
55338
55339
55340
55341
55342
55343
55344
55345
55346
55347
# File 'ext/cntk/cntk_wrap.cxx', line 55321

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_gradient_clipping_with_truncation_set(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","gradientClippingWithTruncation", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  ecode2 = SWIG_AsVal_bool(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","gradientClippingWithTruncation", 2, argv[0] ));
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->gradientClippingWithTruncation = arg2;
  return Qnil;
fail:
  return Qnil;
}

#l1_regularization_weight(*args) ⇒ Object



55138
55139
55140
55141
55142
55143
55144
55145
55146
55147
55148
55149
55150
55151
55152
55153
55154
55155
55156
55157
55158
55159
# File 'ext/cntk/cntk_wrap.cxx', line 55138

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_l1_regularization_weight_get(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","l1RegularizationWeight", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  result = (double) ((arg1)->l1RegularizationWeight);
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}

#l1_regularization_weight=(*args) ⇒ Object



55109
55110
55111
55112
55113
55114
55115
55116
55117
55118
55119
55120
55121
55122
55123
55124
55125
55126
55127
55128
55129
55130
55131
55132
55133
55134
55135
# File 'ext/cntk/cntk_wrap.cxx', line 55109

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_l1_regularization_weight_set(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","l1RegularizationWeight", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","l1RegularizationWeight", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->l1RegularizationWeight = arg2;
  return Qnil;
fail:
  return Qnil;
}

#l2_regularization_weight(*args) ⇒ Object



55191
55192
55193
55194
55195
55196
55197
55198
55199
55200
55201
55202
55203
55204
55205
55206
55207
55208
55209
55210
55211
55212
# File 'ext/cntk/cntk_wrap.cxx', line 55191

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_l2_regularization_weight_get(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","l2RegularizationWeight", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  result = (double) ((arg1)->l2RegularizationWeight);
  vresult = SWIG_From_double(static_cast< double >(result));
  return vresult;
fail:
  return Qnil;
}

#l2_regularization_weight=(*args) ⇒ Object



55162
55163
55164
55165
55166
55167
55168
55169
55170
55171
55172
55173
55174
55175
55176
55177
55178
55179
55180
55181
55182
55183
55184
55185
55186
55187
55188
# File 'ext/cntk/cntk_wrap.cxx', line 55162

SWIGINTERN VALUE
_wrap_AdditionalLearningOptions_l2_regularization_weight_set(int argc, VALUE *argv, VALUE self) {
  CNTK::AdditionalLearningOptions *arg1 = (CNTK::AdditionalLearningOptions *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double 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__AdditionalLearningOptions, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions *","l2RegularizationWeight", 1, self )); 
  }
  arg1 = reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","l2RegularizationWeight", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->l2RegularizationWeight = arg2;
  return Qnil;
fail:
  return Qnil;
}