ruby-cntk 0.1.0.pre2 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/cntk/cntk_wrap.cxx +338 -774
- data/lib/cntk/ndarrayview.rb +1 -1
- data/lib/cntk/ops.rb +4 -4
- data/lib/cntk/trainer.rb +2 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb18feaeefe69b5784ba430bb55d2e4fd2ba0c96
|
4
|
+
data.tar.gz: 1b28f853652382841fe4420048b49fc5eb86848d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e463fdb3186c1c1c7f240315b334cbd25df93b817a2bd873aa00bcf0d8210ebec262d6a669a9a512cfc265a75aaa3d433176220f1188262b2bd1661d6ab1e2da
|
7
|
+
data.tar.gz: 0f3d10e8739e2d659c9d8ca6f1b87d312f4c5f47c3719a10be90dddba1151730a7ae3556b6f37715819ea165db08b508bba5c74a2d835654ba8823ead89769ab
|
data/ext/cntk/cntk_wrap.cxx
CHANGED
@@ -1898,24 +1898,23 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1898
1898
|
#define SWIGTYPE_p_std__unordered_setT_CNTK__DistributedWorkerDescriptor_std__hashT_CNTK__DistributedWorkerDescriptor_t_std__equal_toT_CNTK__DistributedWorkerDescriptor_t_std__allocatorT_CNTK__DistributedWorkerDescriptor_t_t swig_types[68]
|
1899
1899
|
#define SWIGTYPE_p_std__unordered_setT_CNTK__StreamInformation_std__hashT_CNTK__StreamInformation_t_std__equal_toT_CNTK__StreamInformation_t_std__allocatorT_CNTK__StreamInformation_t_t swig_types[69]
|
1900
1900
|
#define SWIGTYPE_p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t swig_types[70]
|
1901
|
-
#define
|
1902
|
-
#define
|
1903
|
-
#define
|
1904
|
-
#define
|
1905
|
-
#define
|
1906
|
-
#define
|
1907
|
-
#define
|
1908
|
-
#define
|
1909
|
-
#define
|
1910
|
-
#define
|
1911
|
-
#define
|
1912
|
-
#define
|
1913
|
-
#define
|
1914
|
-
#define
|
1915
|
-
#define
|
1916
|
-
|
1917
|
-
static
|
1918
|
-
static swig_module_info swig_module = {swig_types, 87, 0, 0, 0, 0};
|
1901
|
+
#define SWIGTYPE_p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t swig_types[71]
|
1902
|
+
#define SWIGTYPE_p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t swig_types[72]
|
1903
|
+
#define SWIGTYPE_p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t swig_types[73]
|
1904
|
+
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_CNTK__Dictionary_t_std__allocatorT_std__shared_ptrT_CNTK__Dictionary_t_t_t swig_types[74]
|
1905
|
+
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_CNTK__Learner_t_std__allocatorT_std__shared_ptrT_CNTK__Learner_t_t_t swig_types[75]
|
1906
|
+
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_CNTK__NDArrayView_t_std__allocatorT_std__shared_ptrT_CNTK__NDArrayView_t_t_t swig_types[76]
|
1907
|
+
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_CNTK__Value_t_std__allocatorT_std__shared_ptrT_CNTK__Value_t_t_t swig_types[77]
|
1908
|
+
#define SWIGTYPE_p_std__vectorT_std__vectorT_size_t_std__allocatorT_size_t_t_t_std__allocatorT_std__vectorT_size_t_std__allocatorT_size_t_t_t_t_t swig_types[78]
|
1909
|
+
#define SWIGTYPE_p_std__wstring swig_types[79]
|
1910
|
+
#define SWIGTYPE_p_swig__ConstIterator swig_types[80]
|
1911
|
+
#define SWIGTYPE_p_swig__GC_VALUE swig_types[81]
|
1912
|
+
#define SWIGTYPE_p_swig__Iterator swig_types[82]
|
1913
|
+
#define SWIGTYPE_p_value_type swig_types[83]
|
1914
|
+
#define SWIGTYPE_p_void swig_types[84]
|
1915
|
+
#define SWIGTYPE_p_wchar_t swig_types[85]
|
1916
|
+
static swig_type_info *swig_types[87];
|
1917
|
+
static swig_module_info swig_module = {swig_types, 86, 0, 0, 0, 0};
|
1919
1918
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1920
1919
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1921
1920
|
|
@@ -4060,11 +4059,6 @@ namespace swig
|
|
4060
4059
|
|
4061
4060
|
|
4062
4061
|
namespace CNTK {};
|
4063
|
-
namespace CNTK {
|
4064
|
-
static CNTK::DeviceDescriptor __cpu_device__ = CNTK::DeviceDescriptor::CPUDevice();
|
4065
|
-
static CNTK::DeviceDescriptor __best_device__ = CNTK::DeviceDescriptor::BestDevice();
|
4066
|
-
static std::vector<CNTK::DeviceDescriptor> __all_device__;
|
4067
|
-
};
|
4068
4062
|
|
4069
4063
|
|
4070
4064
|
namespace swig {
|
@@ -6271,15 +6265,9 @@ SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
|
|
6271
6265
|
SWIGINTERN CNTK::DeviceDescriptor *CNTK_DeviceDescriptor_GPUDevice(unsigned int deviceId){
|
6272
6266
|
return new CNTK::DeviceDescriptor(CNTK::DeviceDescriptor::GPUDevice(deviceId));
|
6273
6267
|
}
|
6274
|
-
SWIGINTERN CNTK::DeviceDescriptor *CNTK_DeviceDescriptor_DefaultDevice(){
|
6275
|
-
return new CNTK::DeviceDescriptor(CNTK::DeviceDescriptor::DefaultDevice());
|
6276
|
-
}
|
6277
6268
|
SWIGINTERN CNTK::DeviceDescriptor *CNTK_DeviceDescriptor_UseDefaultDevice(){
|
6278
6269
|
return new CNTK::DeviceDescriptor(CNTK::DeviceDescriptor::UseDefaultDevice());
|
6279
6270
|
}
|
6280
|
-
SWIGINTERN CNTK::DeviceDescriptor *CNTK_DeviceDescriptor_BestDevice(){
|
6281
|
-
return new CNTK::DeviceDescriptor(CNTK::DeviceDescriptor::BestDevice());
|
6282
|
-
}
|
6283
6271
|
SWIGINTERN bool CNTK_DeviceDescriptor___eq__(CNTK::DeviceDescriptor *self,CNTK::DeviceDescriptor const &other){
|
6284
6272
|
return (*self) == other;
|
6285
6273
|
}
|
@@ -8317,93 +8305,6 @@ namespace swig {
|
|
8317
8305
|
};
|
8318
8306
|
#endif
|
8319
8307
|
|
8320
|
-
SWIGINTERN VALUE
|
8321
|
-
_wrap___cpu_device___get(VALUE self) {
|
8322
|
-
VALUE _val;
|
8323
|
-
|
8324
|
-
_val = SWIG_NewPointerObj(SWIG_as_voidptr(&CNTK::__cpu_device__), SWIGTYPE_p_CNTK__DeviceDescriptor, 0 );
|
8325
|
-
return _val;
|
8326
|
-
}
|
8327
|
-
|
8328
|
-
|
8329
|
-
SWIGINTERN VALUE
|
8330
|
-
_wrap___cpu_device___set(VALUE self, VALUE _val) {
|
8331
|
-
{
|
8332
|
-
void *argp = 0;
|
8333
|
-
int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_CNTK__DeviceDescriptor, 0 );
|
8334
|
-
if (!SWIG_IsOK(res)) {
|
8335
|
-
SWIG_exception_fail(SWIG_ArgError(res), "in variable '""CNTK::__cpu_device__""' of type '""CNTK::DeviceDescriptor""'");
|
8336
|
-
}
|
8337
|
-
if (!argp) {
|
8338
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""CNTK::__cpu_device__""' of type '""CNTK::DeviceDescriptor""'");
|
8339
|
-
} else {
|
8340
|
-
CNTK::__cpu_device__ = *(reinterpret_cast< CNTK::DeviceDescriptor * >(argp));
|
8341
|
-
}
|
8342
|
-
}
|
8343
|
-
return _val;
|
8344
|
-
fail:
|
8345
|
-
return Qnil;
|
8346
|
-
}
|
8347
|
-
|
8348
|
-
|
8349
|
-
SWIGINTERN VALUE
|
8350
|
-
_wrap___best_device___get(VALUE self) {
|
8351
|
-
VALUE _val;
|
8352
|
-
|
8353
|
-
_val = SWIG_NewPointerObj(SWIG_as_voidptr(&CNTK::__best_device__), SWIGTYPE_p_CNTK__DeviceDescriptor, 0 );
|
8354
|
-
return _val;
|
8355
|
-
}
|
8356
|
-
|
8357
|
-
|
8358
|
-
SWIGINTERN VALUE
|
8359
|
-
_wrap___best_device___set(VALUE self, VALUE _val) {
|
8360
|
-
{
|
8361
|
-
void *argp = 0;
|
8362
|
-
int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_CNTK__DeviceDescriptor, 0 );
|
8363
|
-
if (!SWIG_IsOK(res)) {
|
8364
|
-
SWIG_exception_fail(SWIG_ArgError(res), "in variable '""CNTK::__best_device__""' of type '""CNTK::DeviceDescriptor""'");
|
8365
|
-
}
|
8366
|
-
if (!argp) {
|
8367
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""CNTK::__best_device__""' of type '""CNTK::DeviceDescriptor""'");
|
8368
|
-
} else {
|
8369
|
-
CNTK::__best_device__ = *(reinterpret_cast< CNTK::DeviceDescriptor * >(argp));
|
8370
|
-
}
|
8371
|
-
}
|
8372
|
-
return _val;
|
8373
|
-
fail:
|
8374
|
-
return Qnil;
|
8375
|
-
}
|
8376
|
-
|
8377
|
-
|
8378
|
-
SWIGINTERN VALUE
|
8379
|
-
_wrap___all_device___get(VALUE self) {
|
8380
|
-
VALUE _val;
|
8381
|
-
|
8382
|
-
_val = SWIG_NewPointerObj(SWIG_as_voidptr(&CNTK::__all_device__), SWIGTYPE_p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t, 0 );
|
8383
|
-
return _val;
|
8384
|
-
}
|
8385
|
-
|
8386
|
-
|
8387
|
-
SWIGINTERN VALUE
|
8388
|
-
_wrap___all_device___set(VALUE self, VALUE _val) {
|
8389
|
-
{
|
8390
|
-
void *argp = 0;
|
8391
|
-
int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t, 0 );
|
8392
|
-
if (!SWIG_IsOK(res)) {
|
8393
|
-
SWIG_exception_fail(SWIG_ArgError(res), "in variable '""CNTK::__all_device__""' of type '""std::vector< CNTK::DeviceDescriptor,std::allocator< CNTK::DeviceDescriptor > >""'");
|
8394
|
-
}
|
8395
|
-
if (!argp) {
|
8396
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""CNTK::__all_device__""' of type '""std::vector< CNTK::DeviceDescriptor,std::allocator< CNTK::DeviceDescriptor > >""'");
|
8397
|
-
} else {
|
8398
|
-
CNTK::__all_device__ = *(reinterpret_cast< std::vector< CNTK::DeviceDescriptor,std::allocator< CNTK::DeviceDescriptor > > * >(argp));
|
8399
|
-
}
|
8400
|
-
}
|
8401
|
-
return _val;
|
8402
|
-
fail:
|
8403
|
-
return Qnil;
|
8404
|
-
}
|
8405
|
-
|
8406
|
-
|
8407
8308
|
static swig_class SwigClassStdVectorPairVariableVariable;
|
8408
8309
|
|
8409
8310
|
|
@@ -18208,38 +18109,6 @@ fail:
|
|
18208
18109
|
}
|
18209
18110
|
|
18210
18111
|
|
18211
|
-
SWIGINTERN VALUE
|
18212
|
-
_wrap_DeviceDescriptor_default_device(int argc, VALUE *argv, VALUE self) {
|
18213
|
-
CNTK::DeviceDescriptor *result = 0 ;
|
18214
|
-
VALUE vresult = Qnil;
|
18215
|
-
|
18216
|
-
if ((argc < 0) || (argc > 0)) {
|
18217
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
18218
|
-
}
|
18219
|
-
{
|
18220
|
-
try {
|
18221
|
-
result = (CNTK::DeviceDescriptor *)CNTK_DeviceDescriptor_DefaultDevice();
|
18222
|
-
}
|
18223
|
-
catch (const std::runtime_error &e) {
|
18224
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
18225
|
-
}
|
18226
|
-
catch (const std::invalid_argument &e) {
|
18227
|
-
SWIG_exception(SWIG_ValueError,e.what());
|
18228
|
-
}
|
18229
|
-
catch (const std::logic_error &e) {
|
18230
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
18231
|
-
}
|
18232
|
-
catch (...) {
|
18233
|
-
SWIG_exception(SWIG_UnknownError,"Runtime exception");
|
18234
|
-
}
|
18235
|
-
}
|
18236
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CNTK__DeviceDescriptor, SWIG_POINTER_OWN | 0 );
|
18237
|
-
return vresult;
|
18238
|
-
fail:
|
18239
|
-
return Qnil;
|
18240
|
-
}
|
18241
|
-
|
18242
|
-
|
18243
18112
|
SWIGINTERN VALUE
|
18244
18113
|
_wrap_DeviceDescriptor_use_default_device(int argc, VALUE *argv, VALUE self) {
|
18245
18114
|
CNTK::DeviceDescriptor *result = 0 ;
|
@@ -18272,38 +18141,6 @@ fail:
|
|
18272
18141
|
}
|
18273
18142
|
|
18274
18143
|
|
18275
|
-
SWIGINTERN VALUE
|
18276
|
-
_wrap_DeviceDescriptor_best_device(int argc, VALUE *argv, VALUE self) {
|
18277
|
-
CNTK::DeviceDescriptor *result = 0 ;
|
18278
|
-
VALUE vresult = Qnil;
|
18279
|
-
|
18280
|
-
if ((argc < 0) || (argc > 0)) {
|
18281
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
18282
|
-
}
|
18283
|
-
{
|
18284
|
-
try {
|
18285
|
-
result = (CNTK::DeviceDescriptor *)CNTK_DeviceDescriptor_BestDevice();
|
18286
|
-
}
|
18287
|
-
catch (const std::runtime_error &e) {
|
18288
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
18289
|
-
}
|
18290
|
-
catch (const std::invalid_argument &e) {
|
18291
|
-
SWIG_exception(SWIG_ValueError,e.what());
|
18292
|
-
}
|
18293
|
-
catch (const std::logic_error &e) {
|
18294
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
18295
|
-
}
|
18296
|
-
catch (...) {
|
18297
|
-
SWIG_exception(SWIG_UnknownError,"Runtime exception");
|
18298
|
-
}
|
18299
|
-
}
|
18300
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CNTK__DeviceDescriptor, SWIG_POINTER_OWN | 0 );
|
18301
|
-
return vresult;
|
18302
|
-
fail:
|
18303
|
-
return Qnil;
|
18304
|
-
}
|
18305
|
-
|
18306
|
-
|
18307
18144
|
|
18308
18145
|
/*
|
18309
18146
|
Document-method: CNTK::DeviceDescriptor.==
|
@@ -18364,46 +18201,6 @@ fail:
|
|
18364
18201
|
}
|
18365
18202
|
|
18366
18203
|
|
18367
|
-
SWIGINTERN VALUE
|
18368
|
-
_wrap_DeviceDescriptor_set_default_device(int argc, VALUE *argv, VALUE self) {
|
18369
|
-
CNTK::DeviceDescriptor *arg1 = 0 ;
|
18370
|
-
void *argp1 ;
|
18371
|
-
int res1 = 0 ;
|
18372
|
-
|
18373
|
-
if ((argc < 1) || (argc > 1)) {
|
18374
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
18375
|
-
}
|
18376
|
-
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__DeviceDescriptor, 0 );
|
18377
|
-
if (!SWIG_IsOK(res1)) {
|
18378
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DeviceDescriptor const &","CNTK::DeviceDescriptor::SetDefaultDevice", 1, argv[0] ));
|
18379
|
-
}
|
18380
|
-
if (!argp1) {
|
18381
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::DeviceDescriptor const &","CNTK::DeviceDescriptor::SetDefaultDevice", 1, argv[0]));
|
18382
|
-
}
|
18383
|
-
arg1 = reinterpret_cast< CNTK::DeviceDescriptor * >(argp1);
|
18384
|
-
{
|
18385
|
-
try {
|
18386
|
-
CNTK::DeviceDescriptor::SetDefaultDevice((CNTK::DeviceDescriptor const &)*arg1);
|
18387
|
-
}
|
18388
|
-
catch (const std::runtime_error &e) {
|
18389
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
18390
|
-
}
|
18391
|
-
catch (const std::invalid_argument &e) {
|
18392
|
-
SWIG_exception(SWIG_ValueError,e.what());
|
18393
|
-
}
|
18394
|
-
catch (const std::logic_error &e) {
|
18395
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
18396
|
-
}
|
18397
|
-
catch (...) {
|
18398
|
-
SWIG_exception(SWIG_UnknownError,"Runtime exception");
|
18399
|
-
}
|
18400
|
-
}
|
18401
|
-
return Qnil;
|
18402
|
-
fail:
|
18403
|
-
return Qnil;
|
18404
|
-
}
|
18405
|
-
|
18406
|
-
|
18407
18204
|
SWIGINTERN VALUE
|
18408
18205
|
_wrap_DeviceDescriptor_all_devices(int argc, VALUE *argv, VALUE self) {
|
18409
18206
|
std::vector< CNTK::DeviceDescriptor,std::allocator< CNTK::DeviceDescriptor > > *result = 0 ;
|
@@ -46162,9 +45959,8 @@ _wrap___convolution____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
46162
45959
|
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
46163
45960
|
CNTK::NDShape *arg6 = 0 ;
|
46164
45961
|
CNTK::NDShape *arg7 = 0 ;
|
46165
|
-
|
46166
|
-
|
46167
|
-
std::wstring *arg10 = 0 ;
|
45962
|
+
size_t arg8 ;
|
45963
|
+
std::wstring *arg9 = 0 ;
|
46168
45964
|
void *argp1 ;
|
46169
45965
|
int res1 = 0 ;
|
46170
45966
|
void *argp2 ;
|
@@ -46174,16 +45970,14 @@ _wrap___convolution____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
46174
45970
|
int res5 = SWIG_OLDOBJ ;
|
46175
45971
|
CNTK::NDShape tmp6 ;
|
46176
45972
|
CNTK::NDShape tmp7 ;
|
46177
|
-
|
45973
|
+
size_t val8 ;
|
46178
45974
|
int ecode8 = 0 ;
|
46179
|
-
|
46180
|
-
int ecode9 = 0 ;
|
46181
|
-
int res10 = SWIG_OLDOBJ ;
|
45975
|
+
int res9 = SWIG_OLDOBJ ;
|
46182
45976
|
CNTK::FunctionPtr result;
|
46183
45977
|
VALUE vresult = Qnil;
|
46184
45978
|
|
46185
|
-
if ((argc <
|
46186
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
45979
|
+
if ((argc < 9) || (argc > 9)) {
|
45980
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 9)",argc); SWIG_fail;
|
46187
45981
|
}
|
46188
45982
|
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
46189
45983
|
if (!SWIG_IsOK(res1)) {
|
@@ -46268,30 +46062,25 @@ _wrap___convolution____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
46268
46062
|
arg7 = &tmp7;
|
46269
46063
|
}
|
46270
46064
|
}
|
46271
|
-
ecode8 =
|
46065
|
+
ecode8 = SWIG_AsVal_size_t(argv[7], &val8);
|
46272
46066
|
if (!SWIG_IsOK(ecode8)) {
|
46273
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "
|
46274
|
-
}
|
46275
|
-
arg8 = static_cast< bool >(val8);
|
46276
|
-
ecode9 = SWIG_AsVal_size_t(argv[8], &val9);
|
46277
|
-
if (!SWIG_IsOK(ecode9)) {
|
46278
|
-
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "size_t","CNTK::Convolution", 9, argv[8] ));
|
46067
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "size_t","CNTK::Convolution", 8, argv[7] ));
|
46279
46068
|
}
|
46280
|
-
|
46069
|
+
arg8 = static_cast< size_t >(val8);
|
46281
46070
|
{
|
46282
46071
|
std::wstring *ptr = (std::wstring *)0;
|
46283
|
-
|
46284
|
-
if (!SWIG_IsOK(
|
46285
|
-
SWIG_exception_fail(SWIG_ArgError(
|
46072
|
+
res9 = SWIG_AsPtr_std_wstring(argv[8], &ptr);
|
46073
|
+
if (!SWIG_IsOK(res9)) {
|
46074
|
+
SWIG_exception_fail(SWIG_ArgError(res9), Ruby_Format_TypeError( "", "std::wstring const &","CNTK::Convolution", 9, argv[8] ));
|
46286
46075
|
}
|
46287
46076
|
if (!ptr) {
|
46288
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::wstring const &","CNTK::Convolution",
|
46077
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::wstring const &","CNTK::Convolution", 9, argv[8]));
|
46289
46078
|
}
|
46290
|
-
|
46079
|
+
arg9 = ptr;
|
46291
46080
|
}
|
46292
46081
|
{
|
46293
46082
|
try {
|
46294
|
-
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7,arg8,
|
46083
|
+
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7,arg8,(std::wstring const &)*arg9);
|
46295
46084
|
}
|
46296
46085
|
catch (const std::runtime_error &e) {
|
46297
46086
|
SWIG_exception(SWIG_RuntimeError,e.what());
|
@@ -46312,12 +46101,12 @@ _wrap___convolution____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
46312
46101
|
}
|
46313
46102
|
if (SWIG_IsNewObj(res4)) delete arg4;
|
46314
46103
|
if (SWIG_IsNewObj(res5)) delete arg5;
|
46315
|
-
if (SWIG_IsNewObj(
|
46104
|
+
if (SWIG_IsNewObj(res9)) delete arg9;
|
46316
46105
|
return vresult;
|
46317
46106
|
fail:
|
46318
46107
|
if (SWIG_IsNewObj(res4)) delete arg4;
|
46319
46108
|
if (SWIG_IsNewObj(res5)) delete arg5;
|
46320
|
-
if (SWIG_IsNewObj(
|
46109
|
+
if (SWIG_IsNewObj(res9)) delete arg9;
|
46321
46110
|
return Qnil;
|
46322
46111
|
}
|
46323
46112
|
|
@@ -46331,8 +46120,7 @@ _wrap___convolution____SWIG_1(int argc, VALUE *argv, VALUE self) {
|
|
46331
46120
|
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
46332
46121
|
CNTK::NDShape *arg6 = 0 ;
|
46333
46122
|
CNTK::NDShape *arg7 = 0 ;
|
46334
|
-
|
46335
|
-
size_t arg9 ;
|
46123
|
+
size_t arg8 ;
|
46336
46124
|
void *argp1 ;
|
46337
46125
|
int res1 = 0 ;
|
46338
46126
|
void *argp2 ;
|
@@ -46342,15 +46130,13 @@ _wrap___convolution____SWIG_1(int argc, VALUE *argv, VALUE self) {
|
|
46342
46130
|
int res5 = SWIG_OLDOBJ ;
|
46343
46131
|
CNTK::NDShape tmp6 ;
|
46344
46132
|
CNTK::NDShape tmp7 ;
|
46345
|
-
|
46133
|
+
size_t val8 ;
|
46346
46134
|
int ecode8 = 0 ;
|
46347
|
-
size_t val9 ;
|
46348
|
-
int ecode9 = 0 ;
|
46349
46135
|
CNTK::FunctionPtr result;
|
46350
46136
|
VALUE vresult = Qnil;
|
46351
46137
|
|
46352
|
-
if ((argc <
|
46353
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
46138
|
+
if ((argc < 8) || (argc > 8)) {
|
46139
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_fail;
|
46354
46140
|
}
|
46355
46141
|
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
46356
46142
|
if (!SWIG_IsOK(res1)) {
|
@@ -46435,19 +46221,14 @@ _wrap___convolution____SWIG_1(int argc, VALUE *argv, VALUE self) {
|
|
46435
46221
|
arg7 = &tmp7;
|
46436
46222
|
}
|
46437
46223
|
}
|
46438
|
-
ecode8 =
|
46224
|
+
ecode8 = SWIG_AsVal_size_t(argv[7], &val8);
|
46439
46225
|
if (!SWIG_IsOK(ecode8)) {
|
46440
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "
|
46226
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "size_t","CNTK::Convolution", 8, argv[7] ));
|
46441
46227
|
}
|
46442
|
-
arg8 = static_cast<
|
46443
|
-
ecode9 = SWIG_AsVal_size_t(argv[8], &val9);
|
46444
|
-
if (!SWIG_IsOK(ecode9)) {
|
46445
|
-
SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "size_t","CNTK::Convolution", 9, argv[8] ));
|
46446
|
-
}
|
46447
|
-
arg9 = static_cast< size_t >(val9);
|
46228
|
+
arg8 = static_cast< size_t >(val8);
|
46448
46229
|
{
|
46449
46230
|
try {
|
46450
|
-
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7,arg8
|
46231
|
+
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7,arg8);
|
46451
46232
|
}
|
46452
46233
|
catch (const std::runtime_error &e) {
|
46453
46234
|
SWIG_exception(SWIG_RuntimeError,e.what());
|
@@ -46485,7 +46266,6 @@ _wrap___convolution____SWIG_2(int argc, VALUE *argv, VALUE self) {
|
|
46485
46266
|
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
46486
46267
|
CNTK::NDShape *arg6 = 0 ;
|
46487
46268
|
CNTK::NDShape *arg7 = 0 ;
|
46488
|
-
bool arg8 ;
|
46489
46269
|
void *argp1 ;
|
46490
46270
|
int res1 = 0 ;
|
46491
46271
|
void *argp2 ;
|
@@ -46495,13 +46275,11 @@ _wrap___convolution____SWIG_2(int argc, VALUE *argv, VALUE self) {
|
|
46495
46275
|
int res5 = SWIG_OLDOBJ ;
|
46496
46276
|
CNTK::NDShape tmp6 ;
|
46497
46277
|
CNTK::NDShape tmp7 ;
|
46498
|
-
bool val8 ;
|
46499
|
-
int ecode8 = 0 ;
|
46500
46278
|
CNTK::FunctionPtr result;
|
46501
46279
|
VALUE vresult = Qnil;
|
46502
46280
|
|
46503
|
-
if ((argc <
|
46504
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
46281
|
+
if ((argc < 7) || (argc > 7)) {
|
46282
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc); SWIG_fail;
|
46505
46283
|
}
|
46506
46284
|
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
46507
46285
|
if (!SWIG_IsOK(res1)) {
|
@@ -46586,14 +46364,9 @@ _wrap___convolution____SWIG_2(int argc, VALUE *argv, VALUE self) {
|
|
46586
46364
|
arg7 = &tmp7;
|
46587
46365
|
}
|
46588
46366
|
}
|
46589
|
-
ecode8 = SWIG_AsVal_bool(argv[7], &val8);
|
46590
|
-
if (!SWIG_IsOK(ecode8)) {
|
46591
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "bool","CNTK::Convolution", 8, argv[7] ));
|
46592
|
-
}
|
46593
|
-
arg8 = static_cast< bool >(val8);
|
46594
46367
|
{
|
46595
46368
|
try {
|
46596
|
-
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7
|
46369
|
+
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7);
|
46597
46370
|
}
|
46598
46371
|
catch (const std::runtime_error &e) {
|
46599
46372
|
SWIG_exception(SWIG_RuntimeError,e.what());
|
@@ -46630,7 +46403,6 @@ _wrap___convolution____SWIG_3(int argc, VALUE *argv, VALUE self) {
|
|
46630
46403
|
std::vector< bool,std::allocator< bool > > *arg4 = 0 ;
|
46631
46404
|
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
46632
46405
|
CNTK::NDShape *arg6 = 0 ;
|
46633
|
-
CNTK::NDShape *arg7 = 0 ;
|
46634
46406
|
void *argp1 ;
|
46635
46407
|
int res1 = 0 ;
|
46636
46408
|
void *argp2 ;
|
@@ -46639,12 +46411,11 @@ _wrap___convolution____SWIG_3(int argc, VALUE *argv, VALUE self) {
|
|
46639
46411
|
int res4 = SWIG_OLDOBJ ;
|
46640
46412
|
int res5 = SWIG_OLDOBJ ;
|
46641
46413
|
CNTK::NDShape tmp6 ;
|
46642
|
-
CNTK::NDShape tmp7 ;
|
46643
46414
|
CNTK::FunctionPtr result;
|
46644
46415
|
VALUE vresult = Qnil;
|
46645
46416
|
|
46646
|
-
if ((argc <
|
46647
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
46417
|
+
if ((argc < 6) || (argc > 6)) {
|
46418
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
|
46648
46419
|
}
|
46649
46420
|
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
46650
46421
|
if (!SWIG_IsOK(res1)) {
|
@@ -46714,24 +46485,9 @@ _wrap___convolution____SWIG_3(int argc, VALUE *argv, VALUE self) {
|
|
46714
46485
|
arg6 = &tmp6;
|
46715
46486
|
}
|
46716
46487
|
}
|
46717
|
-
{
|
46718
|
-
VALUE arry = rb_check_array_type(argv[6]);
|
46719
|
-
if(NIL_P(arry)) {
|
46720
|
-
rb_raise(rb_eArgError, "Array expected"); SWIG_fail;
|
46721
|
-
}else{
|
46722
|
-
size_t rank = RARRAY_LEN(arry);
|
46723
|
-
std::vector<size_t> dimensions(rank);
|
46724
|
-
for (int i=0; i < rank; i++) {
|
46725
|
-
VALUE elt = RARRAY_AREF(arry, i);
|
46726
|
-
dimensions[rank-i-1] = NUM2SIZET(elt);
|
46727
|
-
}
|
46728
|
-
tmp7 = CNTK::NDShape(dimensions);
|
46729
|
-
arg7 = &tmp7;
|
46730
|
-
}
|
46731
|
-
}
|
46732
46488
|
{
|
46733
46489
|
try {
|
46734
|
-
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6
|
46490
|
+
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6);
|
46735
46491
|
}
|
46736
46492
|
catch (const std::runtime_error &e) {
|
46737
46493
|
SWIG_exception(SWIG_RuntimeError,e.what());
|
@@ -46767,7 +46523,6 @@ _wrap___convolution____SWIG_4(int argc, VALUE *argv, VALUE self) {
|
|
46767
46523
|
CNTK::NDShape *arg3 = 0 ;
|
46768
46524
|
std::vector< bool,std::allocator< bool > > *arg4 = 0 ;
|
46769
46525
|
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
46770
|
-
CNTK::NDShape *arg6 = 0 ;
|
46771
46526
|
void *argp1 ;
|
46772
46527
|
int res1 = 0 ;
|
46773
46528
|
void *argp2 ;
|
@@ -46775,12 +46530,11 @@ _wrap___convolution____SWIG_4(int argc, VALUE *argv, VALUE self) {
|
|
46775
46530
|
CNTK::NDShape tmp3 ;
|
46776
46531
|
int res4 = SWIG_OLDOBJ ;
|
46777
46532
|
int res5 = SWIG_OLDOBJ ;
|
46778
|
-
CNTK::NDShape tmp6 ;
|
46779
46533
|
CNTK::FunctionPtr result;
|
46780
46534
|
VALUE vresult = Qnil;
|
46781
46535
|
|
46782
|
-
if ((argc <
|
46783
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
46536
|
+
if ((argc < 5) || (argc > 5)) {
|
46537
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
|
46784
46538
|
}
|
46785
46539
|
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
46786
46540
|
if (!SWIG_IsOK(res1)) {
|
@@ -46835,24 +46589,9 @@ _wrap___convolution____SWIG_4(int argc, VALUE *argv, VALUE self) {
|
|
46835
46589
|
}
|
46836
46590
|
arg5 = ptr;
|
46837
46591
|
}
|
46838
|
-
{
|
46839
|
-
VALUE arry = rb_check_array_type(argv[5]);
|
46840
|
-
if(NIL_P(arry)) {
|
46841
|
-
rb_raise(rb_eArgError, "Array expected"); SWIG_fail;
|
46842
|
-
}else{
|
46843
|
-
size_t rank = RARRAY_LEN(arry);
|
46844
|
-
std::vector<size_t> dimensions(rank);
|
46845
|
-
for (int i=0; i < rank; i++) {
|
46846
|
-
VALUE elt = RARRAY_AREF(arry, i);
|
46847
|
-
dimensions[rank-i-1] = NUM2SIZET(elt);
|
46848
|
-
}
|
46849
|
-
tmp6 = CNTK::NDShape(dimensions);
|
46850
|
-
arg6 = &tmp6;
|
46851
|
-
}
|
46852
|
-
}
|
46853
46592
|
{
|
46854
46593
|
try {
|
46855
|
-
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5
|
46594
|
+
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5);
|
46856
46595
|
}
|
46857
46596
|
catch (const std::runtime_error &e) {
|
46858
46597
|
SWIG_exception(SWIG_RuntimeError,e.what());
|
@@ -46883,110 +46622,6 @@ fail:
|
|
46883
46622
|
|
46884
46623
|
SWIGINTERN VALUE
|
46885
46624
|
_wrap___convolution____SWIG_5(int argc, VALUE *argv, VALUE self) {
|
46886
|
-
CNTK::Variable *arg1 = 0 ;
|
46887
|
-
CNTK::Variable *arg2 = 0 ;
|
46888
|
-
CNTK::NDShape *arg3 = 0 ;
|
46889
|
-
std::vector< bool,std::allocator< bool > > *arg4 = 0 ;
|
46890
|
-
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
46891
|
-
void *argp1 ;
|
46892
|
-
int res1 = 0 ;
|
46893
|
-
void *argp2 ;
|
46894
|
-
int res2 = 0 ;
|
46895
|
-
CNTK::NDShape tmp3 ;
|
46896
|
-
int res4 = SWIG_OLDOBJ ;
|
46897
|
-
int res5 = SWIG_OLDOBJ ;
|
46898
|
-
CNTK::FunctionPtr result;
|
46899
|
-
VALUE vresult = Qnil;
|
46900
|
-
|
46901
|
-
if ((argc < 5) || (argc > 5)) {
|
46902
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
|
46903
|
-
}
|
46904
|
-
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
46905
|
-
if (!SWIG_IsOK(res1)) {
|
46906
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::Variable const &","CNTK::Convolution", 1, argv[0] ));
|
46907
|
-
}
|
46908
|
-
if (!argp1) {
|
46909
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::Variable const &","CNTK::Convolution", 1, argv[0]));
|
46910
|
-
}
|
46911
|
-
arg1 = reinterpret_cast< CNTK::Variable * >(argp1);
|
46912
|
-
res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_CNTK__Variable, 0 );
|
46913
|
-
if (!SWIG_IsOK(res2)) {
|
46914
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CNTK::Variable const &","CNTK::Convolution", 2, argv[1] ));
|
46915
|
-
}
|
46916
|
-
if (!argp2) {
|
46917
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::Variable const &","CNTK::Convolution", 2, argv[1]));
|
46918
|
-
}
|
46919
|
-
arg2 = reinterpret_cast< CNTK::Variable * >(argp2);
|
46920
|
-
{
|
46921
|
-
VALUE arry = rb_check_array_type(argv[2]);
|
46922
|
-
if(NIL_P(arry)) {
|
46923
|
-
rb_raise(rb_eArgError, "Array expected"); SWIG_fail;
|
46924
|
-
}else{
|
46925
|
-
size_t rank = RARRAY_LEN(arry);
|
46926
|
-
std::vector<size_t> dimensions(rank);
|
46927
|
-
for (int i=0; i < rank; i++) {
|
46928
|
-
VALUE elt = RARRAY_AREF(arry, i);
|
46929
|
-
dimensions[rank-i-1] = NUM2SIZET(elt);
|
46930
|
-
}
|
46931
|
-
tmp3 = CNTK::NDShape(dimensions);
|
46932
|
-
arg3 = &tmp3;
|
46933
|
-
}
|
46934
|
-
}
|
46935
|
-
{
|
46936
|
-
std::vector<bool,std::allocator< bool > > *ptr = (std::vector<bool,std::allocator< bool > > *)0;
|
46937
|
-
res4 = swig::asptr(argv[3], &ptr);
|
46938
|
-
if (!SWIG_IsOK(res4)) {
|
46939
|
-
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "std::vector< bool,std::allocator< bool > > const &","CNTK::Convolution", 4, argv[3] ));
|
46940
|
-
}
|
46941
|
-
if (!ptr) {
|
46942
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< bool,std::allocator< bool > > const &","CNTK::Convolution", 4, argv[3]));
|
46943
|
-
}
|
46944
|
-
arg4 = ptr;
|
46945
|
-
}
|
46946
|
-
{
|
46947
|
-
std::vector<bool,std::allocator< bool > > *ptr = (std::vector<bool,std::allocator< bool > > *)0;
|
46948
|
-
res5 = swig::asptr(argv[4], &ptr);
|
46949
|
-
if (!SWIG_IsOK(res5)) {
|
46950
|
-
SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "std::vector< bool,std::allocator< bool > > const &","CNTK::Convolution", 5, argv[4] ));
|
46951
|
-
}
|
46952
|
-
if (!ptr) {
|
46953
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< bool,std::allocator< bool > > const &","CNTK::Convolution", 5, argv[4]));
|
46954
|
-
}
|
46955
|
-
arg5 = ptr;
|
46956
|
-
}
|
46957
|
-
{
|
46958
|
-
try {
|
46959
|
-
result = CNTK::Convolution((CNTK::Variable const &)*arg1,(CNTK::Variable const &)*arg2,(CNTK::NDShape const &)*arg3,(std::vector< bool,std::allocator< bool > > const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5);
|
46960
|
-
}
|
46961
|
-
catch (const std::runtime_error &e) {
|
46962
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
46963
|
-
}
|
46964
|
-
catch (const std::invalid_argument &e) {
|
46965
|
-
SWIG_exception(SWIG_ValueError,e.what());
|
46966
|
-
}
|
46967
|
-
catch (const std::logic_error &e) {
|
46968
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
46969
|
-
}
|
46970
|
-
catch (...) {
|
46971
|
-
SWIG_exception(SWIG_UnknownError,"Runtime exception");
|
46972
|
-
}
|
46973
|
-
}
|
46974
|
-
{
|
46975
|
-
std::shared_ptr< CNTK::Function > *smartresult = result ? new std::shared_ptr< CNTK::Function >(result) : 0;
|
46976
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_CNTK__Function_t, SWIG_POINTER_OWN);
|
46977
|
-
}
|
46978
|
-
if (SWIG_IsNewObj(res4)) delete arg4;
|
46979
|
-
if (SWIG_IsNewObj(res5)) delete arg5;
|
46980
|
-
return vresult;
|
46981
|
-
fail:
|
46982
|
-
if (SWIG_IsNewObj(res4)) delete arg4;
|
46983
|
-
if (SWIG_IsNewObj(res5)) delete arg5;
|
46984
|
-
return Qnil;
|
46985
|
-
}
|
46986
|
-
|
46987
|
-
|
46988
|
-
SWIGINTERN VALUE
|
46989
|
-
_wrap___convolution____SWIG_6(int argc, VALUE *argv, VALUE self) {
|
46990
46625
|
CNTK::Variable *arg1 = 0 ;
|
46991
46626
|
CNTK::Variable *arg2 = 0 ;
|
46992
46627
|
CNTK::NDShape *arg3 = 0 ;
|
@@ -47075,7 +46710,7 @@ fail:
|
|
47075
46710
|
|
47076
46711
|
|
47077
46712
|
SWIGINTERN VALUE
|
47078
|
-
|
46713
|
+
_wrap___convolution____SWIG_6(int argc, VALUE *argv, VALUE self) {
|
47079
46714
|
CNTK::Variable *arg1 = 0 ;
|
47080
46715
|
CNTK::Variable *arg2 = 0 ;
|
47081
46716
|
CNTK::NDShape *arg3 = 0 ;
|
@@ -47149,7 +46784,7 @@ fail:
|
|
47149
46784
|
|
47150
46785
|
|
47151
46786
|
SWIGINTERN VALUE
|
47152
|
-
|
46787
|
+
_wrap___convolution____SWIG_7(int argc, VALUE *argv, VALUE self) {
|
47153
46788
|
CNTK::Variable *arg1 = 0 ;
|
47154
46789
|
CNTK::Variable *arg2 = 0 ;
|
47155
46790
|
void *argp1 ;
|
@@ -47207,11 +46842,11 @@ fail:
|
|
47207
46842
|
|
47208
46843
|
SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
47209
46844
|
int argc;
|
47210
|
-
VALUE argv[
|
46845
|
+
VALUE argv[9];
|
47211
46846
|
int ii;
|
47212
46847
|
|
47213
46848
|
argc = nargs;
|
47214
|
-
if (argc >
|
46849
|
+
if (argc > 9) SWIG_fail;
|
47215
46850
|
for (ii = 0; (ii < argc); ++ii) {
|
47216
46851
|
argv[ii] = args[ii];
|
47217
46852
|
}
|
@@ -47225,7 +46860,7 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47225
46860
|
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
|
47226
46861
|
_v = SWIG_CheckState(res);
|
47227
46862
|
if (_v) {
|
47228
|
-
return
|
46863
|
+
return _wrap___convolution____SWIG_7(nargs, args, self);
|
47229
46864
|
}
|
47230
46865
|
}
|
47231
46866
|
}
|
@@ -47245,7 +46880,7 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47245
46880
|
_v = NIL_P(rb_check_array_type(argv[2])) ? 0 : 1;
|
47246
46881
|
}
|
47247
46882
|
if (_v) {
|
47248
|
-
return
|
46883
|
+
return _wrap___convolution____SWIG_6(nargs, args, self);
|
47249
46884
|
}
|
47250
46885
|
}
|
47251
46886
|
}
|
@@ -47269,7 +46904,7 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47269
46904
|
int res = swig::asptr(argv[3], (std::vector<bool,std::allocator< bool > >**)(0));
|
47270
46905
|
_v = SWIG_CheckState(res);
|
47271
46906
|
if (_v) {
|
47272
|
-
return
|
46907
|
+
return _wrap___convolution____SWIG_5(nargs, args, self);
|
47273
46908
|
}
|
47274
46909
|
}
|
47275
46910
|
}
|
@@ -47297,7 +46932,7 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47297
46932
|
int res = swig::asptr(argv[4], (std::vector<bool,std::allocator< bool > >**)(0));
|
47298
46933
|
_v = SWIG_CheckState(res);
|
47299
46934
|
if (_v) {
|
47300
|
-
return
|
46935
|
+
return _wrap___convolution____SWIG_4(nargs, args, self);
|
47301
46936
|
}
|
47302
46937
|
}
|
47303
46938
|
}
|
@@ -47332,7 +46967,7 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47332
46967
|
_v = NIL_P(rb_check_array_type(argv[5])) ? 0 : 1;
|
47333
46968
|
}
|
47334
46969
|
if (_v) {
|
47335
|
-
return
|
46970
|
+
return _wrap___convolution____SWIG_3(nargs, args, self);
|
47336
46971
|
}
|
47337
46972
|
}
|
47338
46973
|
}
|
@@ -47374,7 +47009,7 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47374
47009
|
_v = NIL_P(rb_check_array_type(argv[6])) ? 0 : 1;
|
47375
47010
|
}
|
47376
47011
|
if (_v) {
|
47377
|
-
return
|
47012
|
+
return _wrap___convolution____SWIG_2(nargs, args, self);
|
47378
47013
|
}
|
47379
47014
|
}
|
47380
47015
|
}
|
@@ -47418,11 +47053,11 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47418
47053
|
}
|
47419
47054
|
if (_v) {
|
47420
47055
|
{
|
47421
|
-
int res =
|
47056
|
+
int res = SWIG_AsVal_size_t(argv[7], NULL);
|
47422
47057
|
_v = SWIG_CheckState(res);
|
47423
47058
|
}
|
47424
47059
|
if (_v) {
|
47425
|
-
return
|
47060
|
+
return _wrap___convolution____SWIG_1(nargs, args, self);
|
47426
47061
|
}
|
47427
47062
|
}
|
47428
47063
|
}
|
@@ -47467,75 +47102,14 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47467
47102
|
}
|
47468
47103
|
if (_v) {
|
47469
47104
|
{
|
47470
|
-
int res =
|
47105
|
+
int res = SWIG_AsVal_size_t(argv[7], NULL);
|
47471
47106
|
_v = SWIG_CheckState(res);
|
47472
47107
|
}
|
47473
47108
|
if (_v) {
|
47474
|
-
|
47475
|
-
int res = SWIG_AsVal_size_t(argv[8], NULL);
|
47476
|
-
_v = SWIG_CheckState(res);
|
47477
|
-
}
|
47478
|
-
if (_v) {
|
47479
|
-
return _wrap___convolution____SWIG_1(nargs, args, self);
|
47480
|
-
}
|
47481
|
-
}
|
47482
|
-
}
|
47483
|
-
}
|
47484
|
-
}
|
47485
|
-
}
|
47486
|
-
}
|
47487
|
-
}
|
47488
|
-
}
|
47489
|
-
}
|
47490
|
-
if (argc == 10) {
|
47491
|
-
int _v;
|
47492
|
-
void *vptr = 0;
|
47493
|
-
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
|
47494
|
-
_v = SWIG_CheckState(res);
|
47495
|
-
if (_v) {
|
47496
|
-
void *vptr = 0;
|
47497
|
-
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
|
47498
|
-
_v = SWIG_CheckState(res);
|
47499
|
-
if (_v) {
|
47500
|
-
{
|
47501
|
-
// '1000' is the typecheck precedence code. It means: check after basic
|
47502
|
-
// types, but before arrays. See: http://www.swig.org/Doc3.0/Typemaps.html#Typemaps_overloading
|
47503
|
-
_v = NIL_P(rb_check_array_type(argv[2])) ? 0 : 1;
|
47504
|
-
}
|
47505
|
-
if (_v) {
|
47506
|
-
int res = swig::asptr(argv[3], (std::vector<bool,std::allocator< bool > >**)(0));
|
47507
|
-
_v = SWIG_CheckState(res);
|
47508
|
-
if (_v) {
|
47509
|
-
int res = swig::asptr(argv[4], (std::vector<bool,std::allocator< bool > >**)(0));
|
47510
|
-
_v = SWIG_CheckState(res);
|
47511
|
-
if (_v) {
|
47512
|
-
{
|
47513
|
-
// '1000' is the typecheck precedence code. It means: check after basic
|
47514
|
-
// types, but before arrays. See: http://www.swig.org/Doc3.0/Typemaps.html#Typemaps_overloading
|
47515
|
-
_v = NIL_P(rb_check_array_type(argv[5])) ? 0 : 1;
|
47516
|
-
}
|
47517
|
-
if (_v) {
|
47518
|
-
{
|
47519
|
-
// '1000' is the typecheck precedence code. It means: check after basic
|
47520
|
-
// types, but before arrays. See: http://www.swig.org/Doc3.0/Typemaps.html#Typemaps_overloading
|
47521
|
-
_v = NIL_P(rb_check_array_type(argv[6])) ? 0 : 1;
|
47522
|
-
}
|
47523
|
-
if (_v) {
|
47524
|
-
{
|
47525
|
-
int res = SWIG_AsVal_bool(argv[7], NULL);
|
47109
|
+
int res = SWIG_AsPtr_std_wstring(argv[8], (std::wstring**)(0));
|
47526
47110
|
_v = SWIG_CheckState(res);
|
47527
|
-
}
|
47528
|
-
if (_v) {
|
47529
|
-
{
|
47530
|
-
int res = SWIG_AsVal_size_t(argv[8], NULL);
|
47531
|
-
_v = SWIG_CheckState(res);
|
47532
|
-
}
|
47533
47111
|
if (_v) {
|
47534
|
-
|
47535
|
-
_v = SWIG_CheckState(res);
|
47536
|
-
if (_v) {
|
47537
|
-
return _wrap___convolution____SWIG_0(nargs, args, self);
|
47538
|
-
}
|
47112
|
+
return _wrap___convolution____SWIG_0(nargs, args, self);
|
47539
47113
|
}
|
47540
47114
|
}
|
47541
47115
|
}
|
@@ -47548,10 +47122,9 @@ SWIGINTERN VALUE _wrap___convolution__(int nargs, VALUE *args, VALUE self) {
|
|
47548
47122
|
}
|
47549
47123
|
|
47550
47124
|
fail:
|
47551
|
-
Ruby_Format_OverloadedError( argc,
|
47552
|
-
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad,
|
47553
|
-
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad,
|
47554
|
-
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad, bool transpose)\n"
|
47125
|
+
Ruby_Format_OverloadedError( argc, 9, "__convolution__",
|
47126
|
+
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad, size_t maxTempMemSizeInSamples, std::wstring const &name)\n"
|
47127
|
+
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad, size_t maxTempMemSizeInSamples)\n"
|
47555
47128
|
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad)\n"
|
47556
47129
|
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad)\n"
|
47557
47130
|
" CNTK::FunctionPtr __convolution__(CNTK::Variable const &convolutionMap, CNTK::Variable const &operand, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &sharing, std::vector< bool,std::allocator< bool > > const &autoPadding)\n"
|
@@ -47801,7 +47374,8 @@ _wrap___pooling____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
47801
47374
|
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
47802
47375
|
CNTK::NDShape *arg6 = 0 ;
|
47803
47376
|
CNTK::NDShape *arg7 = 0 ;
|
47804
|
-
|
47377
|
+
bool arg8 ;
|
47378
|
+
std::wstring *arg9 = 0 ;
|
47805
47379
|
void *argp1 ;
|
47806
47380
|
int res1 = 0 ;
|
47807
47381
|
int val2 ;
|
@@ -47811,12 +47385,14 @@ _wrap___pooling____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
47811
47385
|
int res5 = SWIG_OLDOBJ ;
|
47812
47386
|
CNTK::NDShape tmp6 ;
|
47813
47387
|
CNTK::NDShape tmp7 ;
|
47814
|
-
|
47388
|
+
bool val8 ;
|
47389
|
+
int ecode8 = 0 ;
|
47390
|
+
int res9 = SWIG_OLDOBJ ;
|
47815
47391
|
CNTK::FunctionPtr result;
|
47816
47392
|
VALUE vresult = Qnil;
|
47817
47393
|
|
47818
|
-
if ((argc <
|
47819
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
47394
|
+
if ((argc < 9) || (argc > 9)) {
|
47395
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 9)",argc); SWIG_fail;
|
47820
47396
|
}
|
47821
47397
|
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
47822
47398
|
if (!SWIG_IsOK(res1)) {
|
@@ -47902,20 +47478,25 @@ _wrap___pooling____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
47902
47478
|
arg7 = &tmp7;
|
47903
47479
|
}
|
47904
47480
|
}
|
47481
|
+
ecode8 = SWIG_AsVal_bool(argv[7], &val8);
|
47482
|
+
if (!SWIG_IsOK(ecode8)) {
|
47483
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "bool","CNTK::Pooling", 8, argv[7] ));
|
47484
|
+
}
|
47485
|
+
arg8 = static_cast< bool >(val8);
|
47905
47486
|
{
|
47906
47487
|
std::wstring *ptr = (std::wstring *)0;
|
47907
|
-
|
47908
|
-
if (!SWIG_IsOK(
|
47909
|
-
SWIG_exception_fail(SWIG_ArgError(
|
47488
|
+
res9 = SWIG_AsPtr_std_wstring(argv[8], &ptr);
|
47489
|
+
if (!SWIG_IsOK(res9)) {
|
47490
|
+
SWIG_exception_fail(SWIG_ArgError(res9), Ruby_Format_TypeError( "", "std::wstring const &","CNTK::Pooling", 9, argv[8] ));
|
47910
47491
|
}
|
47911
47492
|
if (!ptr) {
|
47912
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::wstring const &","CNTK::Pooling",
|
47493
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::wstring const &","CNTK::Pooling", 9, argv[8]));
|
47913
47494
|
}
|
47914
|
-
|
47495
|
+
arg9 = ptr;
|
47915
47496
|
}
|
47916
47497
|
{
|
47917
47498
|
try {
|
47918
|
-
result = CNTK::Pooling((CNTK::Variable const &)*arg1,arg2,(CNTK::NDShape const &)*arg3,(CNTK::NDShape const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7,(std::wstring const &)*
|
47499
|
+
result = CNTK::Pooling((CNTK::Variable const &)*arg1,arg2,(CNTK::NDShape const &)*arg3,(CNTK::NDShape const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7,arg8,(std::wstring const &)*arg9);
|
47919
47500
|
}
|
47920
47501
|
catch (const std::runtime_error &e) {
|
47921
47502
|
SWIG_exception(SWIG_RuntimeError,e.what());
|
@@ -47935,17 +47516,162 @@ _wrap___pooling____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
47935
47516
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_CNTK__Function_t, SWIG_POINTER_OWN);
|
47936
47517
|
}
|
47937
47518
|
if (SWIG_IsNewObj(res5)) delete arg5;
|
47938
|
-
if (SWIG_IsNewObj(
|
47519
|
+
if (SWIG_IsNewObj(res9)) delete arg9;
|
47939
47520
|
return vresult;
|
47940
47521
|
fail:
|
47941
47522
|
if (SWIG_IsNewObj(res5)) delete arg5;
|
47942
|
-
if (SWIG_IsNewObj(
|
47523
|
+
if (SWIG_IsNewObj(res9)) delete arg9;
|
47943
47524
|
return Qnil;
|
47944
47525
|
}
|
47945
47526
|
|
47946
47527
|
|
47947
47528
|
SWIGINTERN VALUE
|
47948
47529
|
_wrap___pooling____SWIG_1(int argc, VALUE *argv, VALUE self) {
|
47530
|
+
CNTK::Variable *arg1 = 0 ;
|
47531
|
+
CNTK::PoolingType arg2 ;
|
47532
|
+
CNTK::NDShape *arg3 = 0 ;
|
47533
|
+
CNTK::NDShape *arg4 = 0 ;
|
47534
|
+
std::vector< bool,std::allocator< bool > > *arg5 = 0 ;
|
47535
|
+
CNTK::NDShape *arg6 = 0 ;
|
47536
|
+
CNTK::NDShape *arg7 = 0 ;
|
47537
|
+
bool arg8 ;
|
47538
|
+
void *argp1 ;
|
47539
|
+
int res1 = 0 ;
|
47540
|
+
int val2 ;
|
47541
|
+
int ecode2 = 0 ;
|
47542
|
+
CNTK::NDShape tmp3 ;
|
47543
|
+
CNTK::NDShape tmp4 ;
|
47544
|
+
int res5 = SWIG_OLDOBJ ;
|
47545
|
+
CNTK::NDShape tmp6 ;
|
47546
|
+
CNTK::NDShape tmp7 ;
|
47547
|
+
bool val8 ;
|
47548
|
+
int ecode8 = 0 ;
|
47549
|
+
CNTK::FunctionPtr result;
|
47550
|
+
VALUE vresult = Qnil;
|
47551
|
+
|
47552
|
+
if ((argc < 8) || (argc > 8)) {
|
47553
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_fail;
|
47554
|
+
}
|
47555
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_CNTK__Variable, 0 );
|
47556
|
+
if (!SWIG_IsOK(res1)) {
|
47557
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::Variable const &","CNTK::Pooling", 1, argv[0] ));
|
47558
|
+
}
|
47559
|
+
if (!argp1) {
|
47560
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::Variable const &","CNTK::Pooling", 1, argv[0]));
|
47561
|
+
}
|
47562
|
+
arg1 = reinterpret_cast< CNTK::Variable * >(argp1);
|
47563
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
47564
|
+
if (!SWIG_IsOK(ecode2)) {
|
47565
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "CNTK::PoolingType","CNTK::Pooling", 2, argv[1] ));
|
47566
|
+
}
|
47567
|
+
arg2 = static_cast< CNTK::PoolingType >(val2);
|
47568
|
+
{
|
47569
|
+
VALUE arry = rb_check_array_type(argv[2]);
|
47570
|
+
if(NIL_P(arry)) {
|
47571
|
+
rb_raise(rb_eArgError, "Array expected"); SWIG_fail;
|
47572
|
+
}else{
|
47573
|
+
size_t rank = RARRAY_LEN(arry);
|
47574
|
+
std::vector<size_t> dimensions(rank);
|
47575
|
+
for (int i=0; i < rank; i++) {
|
47576
|
+
VALUE elt = RARRAY_AREF(arry, i);
|
47577
|
+
dimensions[rank-i-1] = NUM2SIZET(elt);
|
47578
|
+
}
|
47579
|
+
tmp3 = CNTK::NDShape(dimensions);
|
47580
|
+
arg3 = &tmp3;
|
47581
|
+
}
|
47582
|
+
}
|
47583
|
+
{
|
47584
|
+
VALUE arry = rb_check_array_type(argv[3]);
|
47585
|
+
if(NIL_P(arry)) {
|
47586
|
+
rb_raise(rb_eArgError, "Array expected"); SWIG_fail;
|
47587
|
+
}else{
|
47588
|
+
size_t rank = RARRAY_LEN(arry);
|
47589
|
+
std::vector<size_t> dimensions(rank);
|
47590
|
+
for (int i=0; i < rank; i++) {
|
47591
|
+
VALUE elt = RARRAY_AREF(arry, i);
|
47592
|
+
dimensions[rank-i-1] = NUM2SIZET(elt);
|
47593
|
+
}
|
47594
|
+
tmp4 = CNTK::NDShape(dimensions);
|
47595
|
+
arg4 = &tmp4;
|
47596
|
+
}
|
47597
|
+
}
|
47598
|
+
{
|
47599
|
+
std::vector<bool,std::allocator< bool > > *ptr = (std::vector<bool,std::allocator< bool > > *)0;
|
47600
|
+
res5 = swig::asptr(argv[4], &ptr);
|
47601
|
+
if (!SWIG_IsOK(res5)) {
|
47602
|
+
SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "std::vector< bool,std::allocator< bool > > const &","CNTK::Pooling", 5, argv[4] ));
|
47603
|
+
}
|
47604
|
+
if (!ptr) {
|
47605
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< bool,std::allocator< bool > > const &","CNTK::Pooling", 5, argv[4]));
|
47606
|
+
}
|
47607
|
+
arg5 = ptr;
|
47608
|
+
}
|
47609
|
+
{
|
47610
|
+
VALUE arry = rb_check_array_type(argv[5]);
|
47611
|
+
if(NIL_P(arry)) {
|
47612
|
+
rb_raise(rb_eArgError, "Array expected"); SWIG_fail;
|
47613
|
+
}else{
|
47614
|
+
size_t rank = RARRAY_LEN(arry);
|
47615
|
+
std::vector<size_t> dimensions(rank);
|
47616
|
+
for (int i=0; i < rank; i++) {
|
47617
|
+
VALUE elt = RARRAY_AREF(arry, i);
|
47618
|
+
dimensions[rank-i-1] = NUM2SIZET(elt);
|
47619
|
+
}
|
47620
|
+
tmp6 = CNTK::NDShape(dimensions);
|
47621
|
+
arg6 = &tmp6;
|
47622
|
+
}
|
47623
|
+
}
|
47624
|
+
{
|
47625
|
+
VALUE arry = rb_check_array_type(argv[6]);
|
47626
|
+
if(NIL_P(arry)) {
|
47627
|
+
rb_raise(rb_eArgError, "Array expected"); SWIG_fail;
|
47628
|
+
}else{
|
47629
|
+
size_t rank = RARRAY_LEN(arry);
|
47630
|
+
std::vector<size_t> dimensions(rank);
|
47631
|
+
for (int i=0; i < rank; i++) {
|
47632
|
+
VALUE elt = RARRAY_AREF(arry, i);
|
47633
|
+
dimensions[rank-i-1] = NUM2SIZET(elt);
|
47634
|
+
}
|
47635
|
+
tmp7 = CNTK::NDShape(dimensions);
|
47636
|
+
arg7 = &tmp7;
|
47637
|
+
}
|
47638
|
+
}
|
47639
|
+
ecode8 = SWIG_AsVal_bool(argv[7], &val8);
|
47640
|
+
if (!SWIG_IsOK(ecode8)) {
|
47641
|
+
SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "bool","CNTK::Pooling", 8, argv[7] ));
|
47642
|
+
}
|
47643
|
+
arg8 = static_cast< bool >(val8);
|
47644
|
+
{
|
47645
|
+
try {
|
47646
|
+
result = CNTK::Pooling((CNTK::Variable const &)*arg1,arg2,(CNTK::NDShape const &)*arg3,(CNTK::NDShape const &)*arg4,(std::vector< bool,std::allocator< bool > > const &)*arg5,(CNTK::NDShape const &)*arg6,(CNTK::NDShape const &)*arg7,arg8);
|
47647
|
+
}
|
47648
|
+
catch (const std::runtime_error &e) {
|
47649
|
+
SWIG_exception(SWIG_RuntimeError,e.what());
|
47650
|
+
}
|
47651
|
+
catch (const std::invalid_argument &e) {
|
47652
|
+
SWIG_exception(SWIG_ValueError,e.what());
|
47653
|
+
}
|
47654
|
+
catch (const std::logic_error &e) {
|
47655
|
+
SWIG_exception(SWIG_RuntimeError,e.what());
|
47656
|
+
}
|
47657
|
+
catch (...) {
|
47658
|
+
SWIG_exception(SWIG_UnknownError,"Runtime exception");
|
47659
|
+
}
|
47660
|
+
}
|
47661
|
+
{
|
47662
|
+
std::shared_ptr< CNTK::Function > *smartresult = result ? new std::shared_ptr< CNTK::Function >(result) : 0;
|
47663
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_CNTK__Function_t, SWIG_POINTER_OWN);
|
47664
|
+
}
|
47665
|
+
if (SWIG_IsNewObj(res5)) delete arg5;
|
47666
|
+
return vresult;
|
47667
|
+
fail:
|
47668
|
+
if (SWIG_IsNewObj(res5)) delete arg5;
|
47669
|
+
return Qnil;
|
47670
|
+
}
|
47671
|
+
|
47672
|
+
|
47673
|
+
SWIGINTERN VALUE
|
47674
|
+
_wrap___pooling____SWIG_2(int argc, VALUE *argv, VALUE self) {
|
47949
47675
|
CNTK::Variable *arg1 = 0 ;
|
47950
47676
|
CNTK::PoolingType arg2 ;
|
47951
47677
|
CNTK::NDShape *arg3 = 0 ;
|
@@ -48082,7 +47808,7 @@ fail:
|
|
48082
47808
|
|
48083
47809
|
|
48084
47810
|
SWIGINTERN VALUE
|
48085
|
-
|
47811
|
+
_wrap___pooling____SWIG_3(int argc, VALUE *argv, VALUE self) {
|
48086
47812
|
CNTK::Variable *arg1 = 0 ;
|
48087
47813
|
CNTK::PoolingType arg2 ;
|
48088
47814
|
CNTK::NDShape *arg3 = 0 ;
|
@@ -48202,7 +47928,7 @@ fail:
|
|
48202
47928
|
|
48203
47929
|
|
48204
47930
|
SWIGINTERN VALUE
|
48205
|
-
|
47931
|
+
_wrap___pooling____SWIG_4(int argc, VALUE *argv, VALUE self) {
|
48206
47932
|
CNTK::Variable *arg1 = 0 ;
|
48207
47933
|
CNTK::PoolingType arg2 ;
|
48208
47934
|
CNTK::NDShape *arg3 = 0 ;
|
@@ -48305,7 +48031,7 @@ fail:
|
|
48305
48031
|
|
48306
48032
|
|
48307
48033
|
SWIGINTERN VALUE
|
48308
|
-
|
48034
|
+
_wrap___pooling____SWIG_5(int argc, VALUE *argv, VALUE self) {
|
48309
48035
|
CNTK::Variable *arg1 = 0 ;
|
48310
48036
|
CNTK::PoolingType arg2 ;
|
48311
48037
|
CNTK::NDShape *arg3 = 0 ;
|
@@ -48393,7 +48119,7 @@ fail:
|
|
48393
48119
|
|
48394
48120
|
|
48395
48121
|
SWIGINTERN VALUE
|
48396
|
-
|
48122
|
+
_wrap___pooling____SWIG_6(int argc, VALUE *argv, VALUE self) {
|
48397
48123
|
CNTK::Variable *arg1 = 0 ;
|
48398
48124
|
CNTK::PoolingType arg2 ;
|
48399
48125
|
CNTK::NDShape *arg3 = 0 ;
|
@@ -48465,11 +48191,11 @@ fail:
|
|
48465
48191
|
|
48466
48192
|
SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
48467
48193
|
int argc;
|
48468
|
-
VALUE argv[
|
48194
|
+
VALUE argv[9];
|
48469
48195
|
int ii;
|
48470
48196
|
|
48471
48197
|
argc = nargs;
|
48472
|
-
if (argc >
|
48198
|
+
if (argc > 9) SWIG_fail;
|
48473
48199
|
for (ii = 0; (ii < argc); ++ii) {
|
48474
48200
|
argv[ii] = args[ii];
|
48475
48201
|
}
|
@@ -48490,7 +48216,7 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48490
48216
|
_v = NIL_P(rb_check_array_type(argv[2])) ? 0 : 1;
|
48491
48217
|
}
|
48492
48218
|
if (_v) {
|
48493
|
-
return
|
48219
|
+
return _wrap___pooling____SWIG_6(nargs, args, self);
|
48494
48220
|
}
|
48495
48221
|
}
|
48496
48222
|
}
|
@@ -48518,7 +48244,7 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48518
48244
|
_v = NIL_P(rb_check_array_type(argv[3])) ? 0 : 1;
|
48519
48245
|
}
|
48520
48246
|
if (_v) {
|
48521
|
-
return
|
48247
|
+
return _wrap___pooling____SWIG_5(nargs, args, self);
|
48522
48248
|
}
|
48523
48249
|
}
|
48524
48250
|
}
|
@@ -48550,14 +48276,54 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48550
48276
|
int res = swig::asptr(argv[4], (std::vector<bool,std::allocator< bool > >**)(0));
|
48551
48277
|
_v = SWIG_CheckState(res);
|
48552
48278
|
if (_v) {
|
48553
|
-
return
|
48279
|
+
return _wrap___pooling____SWIG_4(nargs, args, self);
|
48280
|
+
}
|
48281
|
+
}
|
48282
|
+
}
|
48283
|
+
}
|
48284
|
+
}
|
48285
|
+
}
|
48286
|
+
if (argc == 6) {
|
48287
|
+
int _v;
|
48288
|
+
void *vptr = 0;
|
48289
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
|
48290
|
+
_v = SWIG_CheckState(res);
|
48291
|
+
if (_v) {
|
48292
|
+
{
|
48293
|
+
int res = SWIG_AsVal_int(argv[1], NULL);
|
48294
|
+
_v = SWIG_CheckState(res);
|
48295
|
+
}
|
48296
|
+
if (_v) {
|
48297
|
+
{
|
48298
|
+
// '1000' is the typecheck precedence code. It means: check after basic
|
48299
|
+
// types, but before arrays. See: http://www.swig.org/Doc3.0/Typemaps.html#Typemaps_overloading
|
48300
|
+
_v = NIL_P(rb_check_array_type(argv[2])) ? 0 : 1;
|
48301
|
+
}
|
48302
|
+
if (_v) {
|
48303
|
+
{
|
48304
|
+
// '1000' is the typecheck precedence code. It means: check after basic
|
48305
|
+
// types, but before arrays. See: http://www.swig.org/Doc3.0/Typemaps.html#Typemaps_overloading
|
48306
|
+
_v = NIL_P(rb_check_array_type(argv[3])) ? 0 : 1;
|
48307
|
+
}
|
48308
|
+
if (_v) {
|
48309
|
+
int res = swig::asptr(argv[4], (std::vector<bool,std::allocator< bool > >**)(0));
|
48310
|
+
_v = SWIG_CheckState(res);
|
48311
|
+
if (_v) {
|
48312
|
+
{
|
48313
|
+
// '1000' is the typecheck precedence code. It means: check after basic
|
48314
|
+
// types, but before arrays. See: http://www.swig.org/Doc3.0/Typemaps.html#Typemaps_overloading
|
48315
|
+
_v = NIL_P(rb_check_array_type(argv[5])) ? 0 : 1;
|
48316
|
+
}
|
48317
|
+
if (_v) {
|
48318
|
+
return _wrap___pooling____SWIG_3(nargs, args, self);
|
48319
|
+
}
|
48554
48320
|
}
|
48555
48321
|
}
|
48556
48322
|
}
|
48557
48323
|
}
|
48558
48324
|
}
|
48559
48325
|
}
|
48560
|
-
if (argc ==
|
48326
|
+
if (argc == 7) {
|
48561
48327
|
int _v;
|
48562
48328
|
void *vptr = 0;
|
48563
48329
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
|
@@ -48589,7 +48355,14 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48589
48355
|
_v = NIL_P(rb_check_array_type(argv[5])) ? 0 : 1;
|
48590
48356
|
}
|
48591
48357
|
if (_v) {
|
48592
|
-
|
48358
|
+
{
|
48359
|
+
// '1000' is the typecheck precedence code. It means: check after basic
|
48360
|
+
// types, but before arrays. See: http://www.swig.org/Doc3.0/Typemaps.html#Typemaps_overloading
|
48361
|
+
_v = NIL_P(rb_check_array_type(argv[6])) ? 0 : 1;
|
48362
|
+
}
|
48363
|
+
if (_v) {
|
48364
|
+
return _wrap___pooling____SWIG_2(nargs, args, self);
|
48365
|
+
}
|
48593
48366
|
}
|
48594
48367
|
}
|
48595
48368
|
}
|
@@ -48597,7 +48370,7 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48597
48370
|
}
|
48598
48371
|
}
|
48599
48372
|
}
|
48600
|
-
if (argc ==
|
48373
|
+
if (argc == 8) {
|
48601
48374
|
int _v;
|
48602
48375
|
void *vptr = 0;
|
48603
48376
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
|
@@ -48635,7 +48408,13 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48635
48408
|
_v = NIL_P(rb_check_array_type(argv[6])) ? 0 : 1;
|
48636
48409
|
}
|
48637
48410
|
if (_v) {
|
48638
|
-
|
48411
|
+
{
|
48412
|
+
int res = SWIG_AsVal_bool(argv[7], NULL);
|
48413
|
+
_v = SWIG_CheckState(res);
|
48414
|
+
}
|
48415
|
+
if (_v) {
|
48416
|
+
return _wrap___pooling____SWIG_1(nargs, args, self);
|
48417
|
+
}
|
48639
48418
|
}
|
48640
48419
|
}
|
48641
48420
|
}
|
@@ -48644,7 +48423,7 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48644
48423
|
}
|
48645
48424
|
}
|
48646
48425
|
}
|
48647
|
-
if (argc ==
|
48426
|
+
if (argc == 9) {
|
48648
48427
|
int _v;
|
48649
48428
|
void *vptr = 0;
|
48650
48429
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
|
@@ -48682,10 +48461,16 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48682
48461
|
_v = NIL_P(rb_check_array_type(argv[6])) ? 0 : 1;
|
48683
48462
|
}
|
48684
48463
|
if (_v) {
|
48685
|
-
|
48686
|
-
|
48464
|
+
{
|
48465
|
+
int res = SWIG_AsVal_bool(argv[7], NULL);
|
48466
|
+
_v = SWIG_CheckState(res);
|
48467
|
+
}
|
48687
48468
|
if (_v) {
|
48688
|
-
|
48469
|
+
int res = SWIG_AsPtr_std_wstring(argv[8], (std::wstring**)(0));
|
48470
|
+
_v = SWIG_CheckState(res);
|
48471
|
+
if (_v) {
|
48472
|
+
return _wrap___pooling____SWIG_0(nargs, args, self);
|
48473
|
+
}
|
48689
48474
|
}
|
48690
48475
|
}
|
48691
48476
|
}
|
@@ -48697,8 +48482,9 @@ SWIGINTERN VALUE _wrap___pooling__(int nargs, VALUE *args, VALUE self) {
|
|
48697
48482
|
}
|
48698
48483
|
|
48699
48484
|
fail:
|
48700
|
-
Ruby_Format_OverloadedError( argc,
|
48701
|
-
" CNTK::FunctionPtr __pooling__(CNTK::Variable const &operand, CNTK::PoolingType poolingType, CNTK::NDShape const &poolingWindowShape, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad, std::wstring const &name)\n"
|
48485
|
+
Ruby_Format_OverloadedError( argc, 9, "__pooling__",
|
48486
|
+
" CNTK::FunctionPtr __pooling__(CNTK::Variable const &operand, CNTK::PoolingType poolingType, CNTK::NDShape const &poolingWindowShape, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad, bool const ceilOutDim, std::wstring const &name)\n"
|
48487
|
+
" CNTK::FunctionPtr __pooling__(CNTK::Variable const &operand, CNTK::PoolingType poolingType, CNTK::NDShape const &poolingWindowShape, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad, bool const ceilOutDim)\n"
|
48702
48488
|
" CNTK::FunctionPtr __pooling__(CNTK::Variable const &operand, CNTK::PoolingType poolingType, CNTK::NDShape const &poolingWindowShape, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad, CNTK::NDShape const &upperPad)\n"
|
48703
48489
|
" CNTK::FunctionPtr __pooling__(CNTK::Variable const &operand, CNTK::PoolingType poolingType, CNTK::NDShape const &poolingWindowShape, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &autoPadding, CNTK::NDShape const &lowerPad)\n"
|
48704
48490
|
" CNTK::FunctionPtr __pooling__(CNTK::Variable const &operand, CNTK::PoolingType poolingType, CNTK::NDShape const &poolingWindowShape, CNTK::NDShape const &strides, std::vector< bool,std::allocator< bool > > const &autoPadding)\n"
|
@@ -57078,8 +56864,7 @@ _wrap___adam_learner____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
57078
56864
|
CNTK::MomentumSchedule *arg3 = 0 ;
|
57079
56865
|
bool arg4 ;
|
57080
56866
|
CNTK::MomentumSchedule *arg5 = 0 ;
|
57081
|
-
|
57082
|
-
CNTK::AdditionalLearningOptions arg7 ;
|
56867
|
+
CNTK::AdditionalLearningOptions arg6 ;
|
57083
56868
|
int res1 = SWIG_OLDOBJ ;
|
57084
56869
|
void *argp2 ;
|
57085
56870
|
int res2 = 0 ;
|
@@ -57089,15 +56874,13 @@ _wrap___adam_learner____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
57089
56874
|
int ecode4 = 0 ;
|
57090
56875
|
void *argp5 ;
|
57091
56876
|
int res5 = 0 ;
|
57092
|
-
|
57093
|
-
int
|
57094
|
-
void *argp7 ;
|
57095
|
-
int res7 = 0 ;
|
56877
|
+
void *argp6 ;
|
56878
|
+
int res6 = 0 ;
|
57096
56879
|
CNTK::LearnerPtr result;
|
57097
56880
|
VALUE vresult = Qnil;
|
57098
56881
|
|
57099
|
-
if ((argc <
|
57100
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
56882
|
+
if ((argc < 6) || (argc > 6)) {
|
56883
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
|
57101
56884
|
}
|
57102
56885
|
{
|
57103
56886
|
std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *ptr = (std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *)0;
|
@@ -57139,121 +56922,17 @@ _wrap___adam_learner____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
|
57139
56922
|
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::MomentumSchedule const &","CNTK::AdamLearner", 5, argv[4]));
|
57140
56923
|
}
|
57141
56924
|
arg5 = reinterpret_cast< CNTK::MomentumSchedule * >(argp5);
|
57142
|
-
ecode6 = SWIG_AsVal_bool(argv[5], &val6);
|
57143
|
-
if (!SWIG_IsOK(ecode6)) {
|
57144
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "bool","CNTK::AdamLearner", 6, argv[5] ));
|
57145
|
-
}
|
57146
|
-
arg6 = static_cast< bool >(val6);
|
57147
56925
|
{
|
57148
|
-
|
57149
|
-
if (!SWIG_IsOK(
|
57150
|
-
SWIG_exception_fail(SWIG_ArgError(
|
56926
|
+
res6 = SWIG_ConvertPtr(argv[5], &argp6, SWIGTYPE_p_CNTK__AdditionalLearningOptions, 0 );
|
56927
|
+
if (!SWIG_IsOK(res6)) {
|
56928
|
+
SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "CNTK::AdditionalLearningOptions","CNTK::AdamLearner", 6, argv[5] ));
|
57151
56929
|
}
|
57152
|
-
if (!
|
57153
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::AdditionalLearningOptions","CNTK::AdamLearner",
|
56930
|
+
if (!argp6) {
|
56931
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::AdditionalLearningOptions","CNTK::AdamLearner", 6, argv[5]));
|
57154
56932
|
} else {
|
57155
|
-
|
56933
|
+
arg6 = *(reinterpret_cast< CNTK::AdditionalLearningOptions * >(argp6));
|
57156
56934
|
}
|
57157
56935
|
}
|
57158
|
-
{
|
57159
|
-
try {
|
57160
|
-
result = CNTK::AdamLearner((std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const &)*arg1,(CNTK::TrainingParameterSchedule< double > const &)*arg2,(CNTK::MomentumSchedule const &)*arg3,arg4,(CNTK::MomentumSchedule const &)*arg5,arg6,arg7);
|
57161
|
-
}
|
57162
|
-
catch (const std::runtime_error &e) {
|
57163
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
57164
|
-
}
|
57165
|
-
catch (const std::invalid_argument &e) {
|
57166
|
-
SWIG_exception(SWIG_ValueError,e.what());
|
57167
|
-
}
|
57168
|
-
catch (const std::logic_error &e) {
|
57169
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
57170
|
-
}
|
57171
|
-
catch (...) {
|
57172
|
-
SWIG_exception(SWIG_UnknownError,"Runtime exception");
|
57173
|
-
}
|
57174
|
-
}
|
57175
|
-
{
|
57176
|
-
std::shared_ptr< CNTK::Learner > *smartresult = result ? new std::shared_ptr< CNTK::Learner >(result) : 0;
|
57177
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_CNTK__Learner_t, SWIG_POINTER_OWN);
|
57178
|
-
}
|
57179
|
-
if (SWIG_IsNewObj(res1)) delete arg1;
|
57180
|
-
return vresult;
|
57181
|
-
fail:
|
57182
|
-
if (SWIG_IsNewObj(res1)) delete arg1;
|
57183
|
-
return Qnil;
|
57184
|
-
}
|
57185
|
-
|
57186
|
-
|
57187
|
-
SWIGINTERN VALUE
|
57188
|
-
_wrap___adam_learner____SWIG_1(int argc, VALUE *argv, VALUE self) {
|
57189
|
-
std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *arg1 = 0 ;
|
57190
|
-
CNTK::LearningRateSchedule *arg2 = 0 ;
|
57191
|
-
CNTK::MomentumSchedule *arg3 = 0 ;
|
57192
|
-
bool arg4 ;
|
57193
|
-
CNTK::MomentumSchedule *arg5 = 0 ;
|
57194
|
-
bool arg6 ;
|
57195
|
-
int res1 = SWIG_OLDOBJ ;
|
57196
|
-
void *argp2 ;
|
57197
|
-
int res2 = 0 ;
|
57198
|
-
void *argp3 ;
|
57199
|
-
int res3 = 0 ;
|
57200
|
-
bool val4 ;
|
57201
|
-
int ecode4 = 0 ;
|
57202
|
-
void *argp5 ;
|
57203
|
-
int res5 = 0 ;
|
57204
|
-
bool val6 ;
|
57205
|
-
int ecode6 = 0 ;
|
57206
|
-
CNTK::LearnerPtr result;
|
57207
|
-
VALUE vresult = Qnil;
|
57208
|
-
|
57209
|
-
if ((argc < 6) || (argc > 6)) {
|
57210
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
|
57211
|
-
}
|
57212
|
-
{
|
57213
|
-
std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *ptr = (std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *)0;
|
57214
|
-
res1 = swig::asptr(argv[0], &ptr);
|
57215
|
-
if (!SWIG_IsOK(res1)) {
|
57216
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const &","CNTK::AdamLearner", 1, argv[0] ));
|
57217
|
-
}
|
57218
|
-
if (!ptr) {
|
57219
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const &","CNTK::AdamLearner", 1, argv[0]));
|
57220
|
-
}
|
57221
|
-
arg1 = ptr;
|
57222
|
-
}
|
57223
|
-
res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_CNTK__TrainingParameterScheduleT_double_t, 0 );
|
57224
|
-
if (!SWIG_IsOK(res2)) {
|
57225
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CNTK::LearningRateSchedule const &","CNTK::AdamLearner", 2, argv[1] ));
|
57226
|
-
}
|
57227
|
-
if (!argp2) {
|
57228
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::LearningRateSchedule const &","CNTK::AdamLearner", 2, argv[1]));
|
57229
|
-
}
|
57230
|
-
arg2 = reinterpret_cast< CNTK::LearningRateSchedule * >(argp2);
|
57231
|
-
res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_CNTK__MomentumSchedule, 0 );
|
57232
|
-
if (!SWIG_IsOK(res3)) {
|
57233
|
-
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "CNTK::MomentumSchedule const &","CNTK::AdamLearner", 3, argv[2] ));
|
57234
|
-
}
|
57235
|
-
if (!argp3) {
|
57236
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::MomentumSchedule const &","CNTK::AdamLearner", 3, argv[2]));
|
57237
|
-
}
|
57238
|
-
arg3 = reinterpret_cast< CNTK::MomentumSchedule * >(argp3);
|
57239
|
-
ecode4 = SWIG_AsVal_bool(argv[3], &val4);
|
57240
|
-
if (!SWIG_IsOK(ecode4)) {
|
57241
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","CNTK::AdamLearner", 4, argv[3] ));
|
57242
|
-
}
|
57243
|
-
arg4 = static_cast< bool >(val4);
|
57244
|
-
res5 = SWIG_ConvertPtr(argv[4], &argp5, SWIGTYPE_p_CNTK__MomentumSchedule, 0 );
|
57245
|
-
if (!SWIG_IsOK(res5)) {
|
57246
|
-
SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "CNTK::MomentumSchedule const &","CNTK::AdamLearner", 5, argv[4] ));
|
57247
|
-
}
|
57248
|
-
if (!argp5) {
|
57249
|
-
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::MomentumSchedule const &","CNTK::AdamLearner", 5, argv[4]));
|
57250
|
-
}
|
57251
|
-
arg5 = reinterpret_cast< CNTK::MomentumSchedule * >(argp5);
|
57252
|
-
ecode6 = SWIG_AsVal_bool(argv[5], &val6);
|
57253
|
-
if (!SWIG_IsOK(ecode6)) {
|
57254
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "bool","CNTK::AdamLearner", 6, argv[5] ));
|
57255
|
-
}
|
57256
|
-
arg6 = static_cast< bool >(val6);
|
57257
56936
|
{
|
57258
56937
|
try {
|
57259
56938
|
result = CNTK::AdamLearner((std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const &)*arg1,(CNTK::TrainingParameterSchedule< double > const &)*arg2,(CNTK::MomentumSchedule const &)*arg3,arg4,(CNTK::MomentumSchedule const &)*arg5,arg6);
|
@@ -57284,7 +56963,7 @@ fail:
|
|
57284
56963
|
|
57285
56964
|
|
57286
56965
|
SWIGINTERN VALUE
|
57287
|
-
|
56966
|
+
_wrap___adam_learner____SWIG_1(int argc, VALUE *argv, VALUE self) {
|
57288
56967
|
std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *arg1 = 0 ;
|
57289
56968
|
CNTK::LearningRateSchedule *arg2 = 0 ;
|
57290
56969
|
CNTK::MomentumSchedule *arg3 = 0 ;
|
@@ -57375,7 +57054,7 @@ fail:
|
|
57375
57054
|
|
57376
57055
|
|
57377
57056
|
SWIGINTERN VALUE
|
57378
|
-
|
57057
|
+
_wrap___adam_learner____SWIG_2(int argc, VALUE *argv, VALUE self) {
|
57379
57058
|
std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *arg1 = 0 ;
|
57380
57059
|
CNTK::LearningRateSchedule *arg2 = 0 ;
|
57381
57060
|
CNTK::MomentumSchedule *arg3 = 0 ;
|
@@ -57455,7 +57134,7 @@ fail:
|
|
57455
57134
|
|
57456
57135
|
|
57457
57136
|
SWIGINTERN VALUE
|
57458
|
-
|
57137
|
+
_wrap___adam_learner____SWIG_3(int argc, VALUE *argv, VALUE self) {
|
57459
57138
|
std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > *arg1 = 0 ;
|
57460
57139
|
CNTK::LearningRateSchedule *arg2 = 0 ;
|
57461
57140
|
CNTK::MomentumSchedule *arg3 = 0 ;
|
@@ -57528,11 +57207,11 @@ fail:
|
|
57528
57207
|
|
57529
57208
|
SWIGINTERN VALUE _wrap___adam_learner__(int nargs, VALUE *args, VALUE self) {
|
57530
57209
|
int argc;
|
57531
|
-
VALUE argv[
|
57210
|
+
VALUE argv[6];
|
57532
57211
|
int ii;
|
57533
57212
|
|
57534
57213
|
argc = nargs;
|
57535
|
-
if (argc >
|
57214
|
+
if (argc > 6) SWIG_fail;
|
57536
57215
|
for (ii = 0; (ii < argc); ++ii) {
|
57537
57216
|
argv[ii] = args[ii];
|
57538
57217
|
}
|
@@ -57549,7 +57228,7 @@ SWIGINTERN VALUE _wrap___adam_learner__(int nargs, VALUE *args, VALUE self) {
|
|
57549
57228
|
int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_CNTK__MomentumSchedule, 0);
|
57550
57229
|
_v = SWIG_CheckState(res);
|
57551
57230
|
if (_v) {
|
57552
|
-
return
|
57231
|
+
return _wrap___adam_learner____SWIG_3(nargs, args, self);
|
57553
57232
|
}
|
57554
57233
|
}
|
57555
57234
|
}
|
@@ -57572,7 +57251,7 @@ SWIGINTERN VALUE _wrap___adam_learner__(int nargs, VALUE *args, VALUE self) {
|
|
57572
57251
|
_v = SWIG_CheckState(res);
|
57573
57252
|
}
|
57574
57253
|
if (_v) {
|
57575
|
-
return
|
57254
|
+
return _wrap___adam_learner____SWIG_2(nargs, args, self);
|
57576
57255
|
}
|
57577
57256
|
}
|
57578
57257
|
}
|
@@ -57600,7 +57279,7 @@ SWIGINTERN VALUE _wrap___adam_learner__(int nargs, VALUE *args, VALUE self) {
|
|
57600
57279
|
int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_CNTK__MomentumSchedule, 0);
|
57601
57280
|
_v = SWIG_CheckState(res);
|
57602
57281
|
if (_v) {
|
57603
|
-
return
|
57282
|
+
return _wrap___adam_learner____SWIG_1(nargs, args, self);
|
57604
57283
|
}
|
57605
57284
|
}
|
57606
57285
|
}
|
@@ -57629,52 +57308,11 @@ SWIGINTERN VALUE _wrap___adam_learner__(int nargs, VALUE *args, VALUE self) {
|
|
57629
57308
|
int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_CNTK__MomentumSchedule, 0);
|
57630
57309
|
_v = SWIG_CheckState(res);
|
57631
57310
|
if (_v) {
|
57632
|
-
|
57633
|
-
|
57634
|
-
|
57635
|
-
}
|
57636
|
-
if (_v) {
|
57637
|
-
return _wrap___adam_learner____SWIG_1(nargs, args, self);
|
57638
|
-
}
|
57639
|
-
}
|
57640
|
-
}
|
57641
|
-
}
|
57642
|
-
}
|
57643
|
-
}
|
57644
|
-
}
|
57645
|
-
if (argc == 7) {
|
57646
|
-
int _v;
|
57647
|
-
int res = swig::asptr(argv[0], (std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > >**)(0));
|
57648
|
-
_v = SWIG_CheckState(res);
|
57649
|
-
if (_v) {
|
57650
|
-
void *vptr = 0;
|
57651
|
-
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CNTK__TrainingParameterScheduleT_double_t, 0);
|
57652
|
-
_v = SWIG_CheckState(res);
|
57653
|
-
if (_v) {
|
57654
|
-
void *vptr = 0;
|
57655
|
-
int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_CNTK__MomentumSchedule, 0);
|
57656
|
-
_v = SWIG_CheckState(res);
|
57657
|
-
if (_v) {
|
57658
|
-
{
|
57659
|
-
int res = SWIG_AsVal_bool(argv[3], NULL);
|
57660
|
-
_v = SWIG_CheckState(res);
|
57661
|
-
}
|
57662
|
-
if (_v) {
|
57663
|
-
void *vptr = 0;
|
57664
|
-
int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_CNTK__MomentumSchedule, 0);
|
57665
|
-
_v = SWIG_CheckState(res);
|
57666
|
-
if (_v) {
|
57667
|
-
{
|
57668
|
-
int res = SWIG_AsVal_bool(argv[5], NULL);
|
57669
|
-
_v = SWIG_CheckState(res);
|
57670
|
-
}
|
57311
|
+
void *vptr = 0;
|
57312
|
+
int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_CNTK__AdditionalLearningOptions, 0);
|
57313
|
+
_v = SWIG_CheckState(res);
|
57671
57314
|
if (_v) {
|
57672
|
-
|
57673
|
-
int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_CNTK__AdditionalLearningOptions, 0);
|
57674
|
-
_v = SWIG_CheckState(res);
|
57675
|
-
if (_v) {
|
57676
|
-
return _wrap___adam_learner____SWIG_0(nargs, args, self);
|
57677
|
-
}
|
57315
|
+
return _wrap___adam_learner____SWIG_0(nargs, args, self);
|
57678
57316
|
}
|
57679
57317
|
}
|
57680
57318
|
}
|
@@ -57684,9 +57322,8 @@ SWIGINTERN VALUE _wrap___adam_learner__(int nargs, VALUE *args, VALUE self) {
|
|
57684
57322
|
}
|
57685
57323
|
|
57686
57324
|
fail:
|
57687
|
-
Ruby_Format_OverloadedError( argc,
|
57688
|
-
" CNTK::LearnerPtr __adam_learner__(std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const ¶meters, CNTK::LearningRateSchedule const &learningRateSchedule, CNTK::MomentumSchedule const &momentumSchedule, bool unitGain, CNTK::MomentumSchedule const &varianceMomentumSchedule,
|
57689
|
-
" CNTK::LearnerPtr __adam_learner__(std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const ¶meters, CNTK::LearningRateSchedule const &learningRateSchedule, CNTK::MomentumSchedule const &momentumSchedule, bool unitGain, CNTK::MomentumSchedule const &varianceMomentumSchedule, bool lowMemory)\n"
|
57325
|
+
Ruby_Format_OverloadedError( argc, 6, "__adam_learner__",
|
57326
|
+
" CNTK::LearnerPtr __adam_learner__(std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const ¶meters, CNTK::LearningRateSchedule const &learningRateSchedule, CNTK::MomentumSchedule const &momentumSchedule, bool unitGain, CNTK::MomentumSchedule const &varianceMomentumSchedule, CNTK::AdditionalLearningOptions additionalOptions)\n"
|
57690
57327
|
" CNTK::LearnerPtr __adam_learner__(std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const ¶meters, CNTK::LearningRateSchedule const &learningRateSchedule, CNTK::MomentumSchedule const &momentumSchedule, bool unitGain, CNTK::MomentumSchedule const &varianceMomentumSchedule)\n"
|
57691
57328
|
" CNTK::LearnerPtr __adam_learner__(std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const ¶meters, CNTK::LearningRateSchedule const &learningRateSchedule, CNTK::MomentumSchedule const &momentumSchedule, bool unitGain)\n"
|
57692
57329
|
" CNTK::LearnerPtr __adam_learner__(std::vector< CNTK::Parameter,std::allocator< CNTK::Parameter > > const ¶meters, CNTK::LearningRateSchedule const &learningRateSchedule, CNTK::MomentumSchedule const &momentumSchedule)\n");
|
@@ -66679,65 +66316,6 @@ fail:
|
|
66679
66316
|
}
|
66680
66317
|
|
66681
66318
|
|
66682
|
-
SWIGINTERN VALUE
|
66683
|
-
_wrap_TrainingSession_on_progress(int argc, VALUE *argv, VALUE self) {
|
66684
|
-
CNTK::TrainingSession *arg1 = (CNTK::TrainingSession *) 0 ;
|
66685
|
-
size_t arg2 ;
|
66686
|
-
void *argp1 = 0 ;
|
66687
|
-
int res1 = 0 ;
|
66688
|
-
std::shared_ptr< CNTK::TrainingSession > tempshared1 ;
|
66689
|
-
std::shared_ptr< CNTK::TrainingSession > *smartarg1 = 0 ;
|
66690
|
-
size_t val2 ;
|
66691
|
-
int ecode2 = 0 ;
|
66692
|
-
|
66693
|
-
if ((argc < 1) || (argc > 1)) {
|
66694
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
66695
|
-
}
|
66696
|
-
{
|
66697
|
-
swig_ruby_owntype newmem = {
|
66698
|
-
0, 0
|
66699
|
-
};
|
66700
|
-
res1 = SWIG_ConvertPtrAndOwn(self, &argp1, SWIGTYPE_p_std__shared_ptrT_CNTK__TrainingSession_t, 0 | 0 , &newmem);
|
66701
|
-
if (!SWIG_IsOK(res1)) {
|
66702
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::TrainingSession *","OnProgress", 1, self ));
|
66703
|
-
}
|
66704
|
-
if (newmem.own & SWIG_CAST_NEW_MEMORY) {
|
66705
|
-
tempshared1 = *reinterpret_cast< std::shared_ptr< CNTK::TrainingSession > * >(argp1);
|
66706
|
-
delete reinterpret_cast< std::shared_ptr< CNTK::TrainingSession > * >(argp1);
|
66707
|
-
arg1 = const_cast< CNTK::TrainingSession * >(tempshared1.get());
|
66708
|
-
} else {
|
66709
|
-
smartarg1 = reinterpret_cast< std::shared_ptr< CNTK::TrainingSession > * >(argp1);
|
66710
|
-
arg1 = const_cast< CNTK::TrainingSession * >((smartarg1 ? smartarg1->get() : 0));
|
66711
|
-
}
|
66712
|
-
}
|
66713
|
-
ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
|
66714
|
-
if (!SWIG_IsOK(ecode2)) {
|
66715
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","OnProgress", 2, argv[0] ));
|
66716
|
-
}
|
66717
|
-
arg2 = static_cast< size_t >(val2);
|
66718
|
-
{
|
66719
|
-
try {
|
66720
|
-
(arg1)->OnProgress(arg2);
|
66721
|
-
}
|
66722
|
-
catch (const std::runtime_error &e) {
|
66723
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
66724
|
-
}
|
66725
|
-
catch (const std::invalid_argument &e) {
|
66726
|
-
SWIG_exception(SWIG_ValueError,e.what());
|
66727
|
-
}
|
66728
|
-
catch (const std::logic_error &e) {
|
66729
|
-
SWIG_exception(SWIG_RuntimeError,e.what());
|
66730
|
-
}
|
66731
|
-
catch (...) {
|
66732
|
-
SWIG_exception(SWIG_UnknownError,"Runtime exception");
|
66733
|
-
}
|
66734
|
-
}
|
66735
|
-
return Qnil;
|
66736
|
-
fail:
|
66737
|
-
return Qnil;
|
66738
|
-
}
|
66739
|
-
|
66740
|
-
|
66741
66319
|
SWIGINTERN VALUE
|
66742
66320
|
_wrap___create_basic_training_session____SWIG_0(int argc, VALUE *argv, VALUE self) {
|
66743
66321
|
CNTK::MinibatchSourcePtr *arg1 = 0 ;
|
@@ -68811,7 +68389,6 @@ static swig_type_info _swigt__p_std__unordered_mapT_CNTK__Variable_std__shared_p
|
|
68811
68389
|
static swig_type_info _swigt__p_std__unordered_setT_CNTK__DistributedWorkerDescriptor_std__hashT_CNTK__DistributedWorkerDescriptor_t_std__equal_toT_CNTK__DistributedWorkerDescriptor_t_std__allocatorT_CNTK__DistributedWorkerDescriptor_t_t = {"_p_std__unordered_setT_CNTK__DistributedWorkerDescriptor_std__hashT_CNTK__DistributedWorkerDescriptor_t_std__equal_toT_CNTK__DistributedWorkerDescriptor_t_std__allocatorT_CNTK__DistributedWorkerDescriptor_t_t", "std::unordered_set< CNTK::DistributedWorkerDescriptor > *|std::unordered_set< CNTK::DistributedWorkerDescriptor,std::hash< CNTK::DistributedWorkerDescriptor >,std::equal_to< CNTK::DistributedWorkerDescriptor >,std::allocator< CNTK::DistributedWorkerDescriptor > > *", 0, 0, (void*)0, 0};
|
68812
68390
|
static swig_type_info _swigt__p_std__unordered_setT_CNTK__StreamInformation_std__hashT_CNTK__StreamInformation_t_std__equal_toT_CNTK__StreamInformation_t_std__allocatorT_CNTK__StreamInformation_t_t = {"_p_std__unordered_setT_CNTK__StreamInformation_std__hashT_CNTK__StreamInformation_t_std__equal_toT_CNTK__StreamInformation_t_std__allocatorT_CNTK__StreamInformation_t_t", "std::unordered_set< CNTK::StreamInformation,std::hash< CNTK::StreamInformation >,std::equal_to< CNTK::StreamInformation >,std::allocator< CNTK::StreamInformation > > *", 0, 0, (void*)0, 0};
|
68813
68391
|
static swig_type_info _swigt__p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t = {"_p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t", "std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *|std::unordered_set< CNTK::Variable > *", 0, 0, (void*)0, 0};
|
68814
|
-
static swig_type_info _swigt__p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t = {"_p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t", "std::vector< CNTK::DeviceDescriptor,std::allocator< CNTK::DeviceDescriptor > > *", 0, 0, (void*)0, 0};
|
68815
68392
|
static swig_type_info _swigt__p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t = {"_p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t", "std::vector< CNTK::DictionaryValue,std::allocator< CNTK::DictionaryValue > > *|std::vector< CNTK::DictionaryValue > *", 0, 0, (void*)0, 0};
|
68816
68393
|
static swig_type_info _swigt__p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t = {"_p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t", "std::vector< std::pair< CNTK::Variable,CNTK::Variable > > *|std::vector< std::pair< CNTK::Variable,CNTK::Variable >,std::allocator< std::pair< CNTK::Variable,CNTK::Variable > > > *", 0, 0, (void*)0, 0};
|
68817
68394
|
static swig_type_info _swigt__p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t = {"_p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t", "std::vector< std::pair< size_t,double >,std::allocator< std::pair< size_t,double > > > *", 0, 0, (void*)0, 0};
|
@@ -68900,7 +68477,6 @@ static swig_type_info *swig_type_initial[] = {
|
|
68900
68477
|
&_swigt__p_std__unordered_setT_CNTK__DistributedWorkerDescriptor_std__hashT_CNTK__DistributedWorkerDescriptor_t_std__equal_toT_CNTK__DistributedWorkerDescriptor_t_std__allocatorT_CNTK__DistributedWorkerDescriptor_t_t,
|
68901
68478
|
&_swigt__p_std__unordered_setT_CNTK__StreamInformation_std__hashT_CNTK__StreamInformation_t_std__equal_toT_CNTK__StreamInformation_t_std__allocatorT_CNTK__StreamInformation_t_t,
|
68902
68479
|
&_swigt__p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t,
|
68903
|
-
&_swigt__p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t,
|
68904
68480
|
&_swigt__p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t,
|
68905
68481
|
&_swigt__p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t,
|
68906
68482
|
&_swigt__p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t,
|
@@ -68989,7 +68565,6 @@ static swig_cast_info _swigc__p_std__unordered_mapT_CNTK__Variable_std__shared_p
|
|
68989
68565
|
static swig_cast_info _swigc__p_std__unordered_setT_CNTK__DistributedWorkerDescriptor_std__hashT_CNTK__DistributedWorkerDescriptor_t_std__equal_toT_CNTK__DistributedWorkerDescriptor_t_std__allocatorT_CNTK__DistributedWorkerDescriptor_t_t[] = { {&_swigt__p_std__unordered_setT_CNTK__DistributedWorkerDescriptor_std__hashT_CNTK__DistributedWorkerDescriptor_t_std__equal_toT_CNTK__DistributedWorkerDescriptor_t_std__allocatorT_CNTK__DistributedWorkerDescriptor_t_t, 0, 0, 0},{0, 0, 0, 0}};
|
68990
68566
|
static swig_cast_info _swigc__p_std__unordered_setT_CNTK__StreamInformation_std__hashT_CNTK__StreamInformation_t_std__equal_toT_CNTK__StreamInformation_t_std__allocatorT_CNTK__StreamInformation_t_t[] = { {&_swigt__p_std__unordered_setT_CNTK__StreamInformation_std__hashT_CNTK__StreamInformation_t_std__equal_toT_CNTK__StreamInformation_t_std__allocatorT_CNTK__StreamInformation_t_t, 0, 0, 0},{0, 0, 0, 0}};
|
68991
68567
|
static swig_cast_info _swigc__p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t[] = { {&_swigt__p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0, 0, 0},{0, 0, 0, 0}};
|
68992
|
-
static swig_cast_info _swigc__p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t[] = { {&_swigt__p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t, 0, 0, 0},{0, 0, 0, 0}};
|
68993
68568
|
static swig_cast_info _swigc__p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t[] = { {&_swigt__p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t, 0, 0, 0},{0, 0, 0, 0}};
|
68994
68569
|
static swig_cast_info _swigc__p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t[] = { {&_swigt__p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
|
68995
68570
|
static swig_cast_info _swigc__p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t[] = { {&_swigt__p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -69078,7 +68653,6 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
69078
68653
|
_swigc__p_std__unordered_setT_CNTK__DistributedWorkerDescriptor_std__hashT_CNTK__DistributedWorkerDescriptor_t_std__equal_toT_CNTK__DistributedWorkerDescriptor_t_std__allocatorT_CNTK__DistributedWorkerDescriptor_t_t,
|
69079
68654
|
_swigc__p_std__unordered_setT_CNTK__StreamInformation_std__hashT_CNTK__StreamInformation_t_std__equal_toT_CNTK__StreamInformation_t_std__allocatorT_CNTK__StreamInformation_t_t,
|
69080
68655
|
_swigc__p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t,
|
69081
|
-
_swigc__p_std__vectorT_CNTK__DeviceDescriptor_std__allocatorT_CNTK__DeviceDescriptor_t_t,
|
69082
68656
|
_swigc__p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t,
|
69083
68657
|
_swigc__p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t,
|
69084
68658
|
_swigc__p_std__vectorT_std__pairT_size_t_double_t_std__allocatorT_std__pairT_size_t_double_t_t_t,
|
@@ -69392,12 +68966,6 @@ SWIGEXPORT void Init_CNTK(void) {
|
|
69392
68966
|
SwigClassIterator.destroy = (void (*)(void *)) free_swig_Iterator;
|
69393
68967
|
SwigClassIterator.trackObjects = 0;
|
69394
68968
|
rb_define_const(mCNTK, "SHARED_PTR_DISOWN", SWIG_From_int(static_cast< int >(0)));
|
69395
|
-
rb_define_singleton_method(mCNTK, "__cpu_device__", VALUEFUNC(_wrap___cpu_device___get), 0);
|
69396
|
-
rb_define_singleton_method(mCNTK, "__cpu_device__=", VALUEFUNC(_wrap___cpu_device___set), 1);
|
69397
|
-
rb_define_singleton_method(mCNTK, "__best_device__", VALUEFUNC(_wrap___best_device___get), 0);
|
69398
|
-
rb_define_singleton_method(mCNTK, "__best_device__=", VALUEFUNC(_wrap___best_device___set), 1);
|
69399
|
-
rb_define_singleton_method(mCNTK, "__all_device__", VALUEFUNC(_wrap___all_device___get), 0);
|
69400
|
-
rb_define_singleton_method(mCNTK, "__all_device__=", VALUEFUNC(_wrap___all_device___set), 1);
|
69401
68969
|
|
69402
68970
|
SwigClassStdVectorPairVariableVariable.klass = rb_define_class_under(mCNTK, "StdVectorPairVariableVariable", rb_cObject);
|
69403
68971
|
SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__pairT_CNTK__Variable_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_CNTK__Variable_t_t_t, (void *) &SwigClassStdVectorPairVariableVariable);
|
@@ -69672,11 +69240,8 @@ SWIGEXPORT void Init_CNTK(void) {
|
|
69672
69240
|
rb_define_method(SwigClassDeviceDescriptor.klass, "type", VALUEFUNC(_wrap_DeviceDescriptor_type), -1);
|
69673
69241
|
rb_define_singleton_method(SwigClassDeviceDescriptor.klass, "cpudevice", VALUEFUNC(_wrap_DeviceDescriptor_cpudevice), -1);
|
69674
69242
|
rb_define_singleton_method(SwigClassDeviceDescriptor.klass, "gpudevice", VALUEFUNC(_wrap_DeviceDescriptor_gpudevice), -1);
|
69675
|
-
rb_define_singleton_method(SwigClassDeviceDescriptor.klass, "default_device", VALUEFUNC(_wrap_DeviceDescriptor_default_device), -1);
|
69676
69243
|
rb_define_singleton_method(SwigClassDeviceDescriptor.klass, "use_default_device", VALUEFUNC(_wrap_DeviceDescriptor_use_default_device), -1);
|
69677
|
-
rb_define_singleton_method(SwigClassDeviceDescriptor.klass, "best_device", VALUEFUNC(_wrap_DeviceDescriptor_best_device), -1);
|
69678
69244
|
rb_define_method(SwigClassDeviceDescriptor.klass, "==", VALUEFUNC(_wrap_DeviceDescriptor___eq__), -1);
|
69679
|
-
rb_define_singleton_method(SwigClassDeviceDescriptor.klass, "set_default_device", VALUEFUNC(_wrap_DeviceDescriptor_set_default_device), -1);
|
69680
69245
|
rb_define_singleton_method(SwigClassDeviceDescriptor.klass, "all_devices", VALUEFUNC(_wrap_DeviceDescriptor_all_devices), -1);
|
69681
69246
|
SwigClassDeviceDescriptor.mark = 0;
|
69682
69247
|
SwigClassDeviceDescriptor.destroy = (void (*)(void *)) free_CNTK_DeviceDescriptor;
|
@@ -70257,7 +69822,6 @@ SWIGEXPORT void Init_CNTK(void) {
|
|
70257
69822
|
rb_define_method(SwigClassTrainingSession.klass, "on_checkpoint_end", VALUEFUNC(_wrap_TrainingSession_on_checkpoint_end), -1);
|
70258
69823
|
rb_define_method(SwigClassTrainingSession.klass, "on_cross_validation_start", VALUEFUNC(_wrap_TrainingSession_on_cross_validation_start), -1);
|
70259
69824
|
rb_define_method(SwigClassTrainingSession.klass, "on_cross_validation_end", VALUEFUNC(_wrap_TrainingSession_on_cross_validation_end), -1);
|
70260
|
-
rb_define_method(SwigClassTrainingSession.klass, "on_progress", VALUEFUNC(_wrap_TrainingSession_on_progress), -1);
|
70261
69825
|
SwigClassTrainingSession.mark = 0;
|
70262
69826
|
SwigClassTrainingSession.destroy = (void (*)(void *)) free_CNTK_TrainingSession;
|
70263
69827
|
SwigClassTrainingSession.trackObjects = 0;
|