@@ -154,13 +154,13 @@ public byte Item
154
154
}
155
155
156
156
[ DllImport ( "LibTorchSharp" ) ]
157
- extern static string THS_device ( HType handle ) ;
157
+ extern static string THS_deviceType ( HType handle ) ;
158
158
159
159
public string Device
160
160
{
161
161
get
162
162
{
163
- return THS_device ( handle ) ;
163
+ return THS_deviceType ( handle ) ;
164
164
}
165
165
}
166
166
@@ -208,7 +208,7 @@ public long GetTensorStride (int dim)
208
208
/// <summary>
209
209
/// Create a new tensor filled with ones
210
210
/// </summary>
211
- static public ITorchTensor < byte > Ones ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
211
+ static public ITorchTensor < byte > Ones ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
212
212
{
213
213
unsafe
214
214
{
@@ -225,7 +225,7 @@ static public ITorchTensor<byte> Ones(long[] size, string device = "cpu:0", bool
225
225
/// <summary>
226
226
/// Create a new tensor filled with ones
227
227
/// </summary>
228
- static public ITorchTensor < byte > RandomN ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
228
+ static public ITorchTensor < byte > RandomN ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
229
229
{
230
230
unsafe
231
231
{
@@ -438,13 +438,13 @@ public short Item
438
438
}
439
439
440
440
[ DllImport ( "LibTorchSharp" ) ]
441
- extern static string THS_device ( HType handle ) ;
441
+ extern static string THS_deviceType ( HType handle ) ;
442
442
443
443
public string Device
444
444
{
445
445
get
446
446
{
447
- return THS_device ( handle ) ;
447
+ return THS_deviceType ( handle ) ;
448
448
}
449
449
}
450
450
@@ -492,7 +492,7 @@ public long GetTensorStride (int dim)
492
492
/// <summary>
493
493
/// Create a new tensor filled with ones
494
494
/// </summary>
495
- static public ITorchTensor < short > Ones ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
495
+ static public ITorchTensor < short > Ones ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
496
496
{
497
497
unsafe
498
498
{
@@ -509,7 +509,7 @@ static public ITorchTensor<short> Ones(long[] size, string device = "cpu:0", boo
509
509
/// <summary>
510
510
/// Create a new tensor filled with ones
511
511
/// </summary>
512
- static public ITorchTensor < short > RandomN ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
512
+ static public ITorchTensor < short > RandomN ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
513
513
{
514
514
unsafe
515
515
{
@@ -722,13 +722,13 @@ public int Item
722
722
}
723
723
724
724
[ DllImport ( "LibTorchSharp" ) ]
725
- extern static string THS_device ( HType handle ) ;
725
+ extern static string THS_deviceType ( HType handle ) ;
726
726
727
727
public string Device
728
728
{
729
729
get
730
730
{
731
- return THS_device ( handle ) ;
731
+ return THS_deviceType ( handle ) ;
732
732
}
733
733
}
734
734
@@ -776,7 +776,7 @@ public long GetTensorStride (int dim)
776
776
/// <summary>
777
777
/// Create a new tensor filled with ones
778
778
/// </summary>
779
- static public ITorchTensor < int > Ones ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
779
+ static public ITorchTensor < int > Ones ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
780
780
{
781
781
unsafe
782
782
{
@@ -793,7 +793,7 @@ static public ITorchTensor<int> Ones(long[] size, string device = "cpu:0", bool
793
793
/// <summary>
794
794
/// Create a new tensor filled with ones
795
795
/// </summary>
796
- static public ITorchTensor < int > RandomN ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
796
+ static public ITorchTensor < int > RandomN ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
797
797
{
798
798
unsafe
799
799
{
@@ -1006,13 +1006,13 @@ public long Item
1006
1006
}
1007
1007
1008
1008
[ DllImport ( "LibTorchSharp" ) ]
1009
- extern static string THS_device ( HType handle ) ;
1009
+ extern static string THS_deviceType ( HType handle ) ;
1010
1010
1011
1011
public string Device
1012
1012
{
1013
1013
get
1014
1014
{
1015
- return THS_device ( handle ) ;
1015
+ return THS_deviceType ( handle ) ;
1016
1016
}
1017
1017
}
1018
1018
@@ -1060,7 +1060,7 @@ public long GetTensorStride (int dim)
1060
1060
/// <summary>
1061
1061
/// Create a new tensor filled with ones
1062
1062
/// </summary>
1063
- static public ITorchTensor < long > Ones ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
1063
+ static public ITorchTensor < long > Ones ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
1064
1064
{
1065
1065
unsafe
1066
1066
{
@@ -1077,7 +1077,7 @@ static public ITorchTensor<long> Ones(long[] size, string device = "cpu:0", bool
1077
1077
/// <summary>
1078
1078
/// Create a new tensor filled with ones
1079
1079
/// </summary>
1080
- static public ITorchTensor < long > RandomN ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
1080
+ static public ITorchTensor < long > RandomN ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
1081
1081
{
1082
1082
unsafe
1083
1083
{
@@ -1290,13 +1290,13 @@ public double Item
1290
1290
}
1291
1291
1292
1292
[ DllImport ( "LibTorchSharp" ) ]
1293
- extern static string THS_device ( HType handle ) ;
1293
+ extern static string THS_deviceType ( HType handle ) ;
1294
1294
1295
1295
public string Device
1296
1296
{
1297
1297
get
1298
1298
{
1299
- return THS_device ( handle ) ;
1299
+ return THS_deviceType ( handle ) ;
1300
1300
}
1301
1301
}
1302
1302
@@ -1344,7 +1344,7 @@ public long GetTensorStride (int dim)
1344
1344
/// <summary>
1345
1345
/// Create a new tensor filled with ones
1346
1346
/// </summary>
1347
- static public ITorchTensor < double > Ones ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
1347
+ static public ITorchTensor < double > Ones ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
1348
1348
{
1349
1349
unsafe
1350
1350
{
@@ -1361,7 +1361,7 @@ static public ITorchTensor<double> Ones(long[] size, string device = "cpu:0", bo
1361
1361
/// <summary>
1362
1362
/// Create a new tensor filled with ones
1363
1363
/// </summary>
1364
- static public ITorchTensor < double > RandomN ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
1364
+ static public ITorchTensor < double > RandomN ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
1365
1365
{
1366
1366
unsafe
1367
1367
{
@@ -1574,13 +1574,13 @@ public float Item
1574
1574
}
1575
1575
1576
1576
[ DllImport ( "LibTorchSharp" ) ]
1577
- extern static string THS_device ( HType handle ) ;
1577
+ extern static string THS_deviceType ( HType handle ) ;
1578
1578
1579
1579
public string Device
1580
1580
{
1581
1581
get
1582
1582
{
1583
- return THS_device ( handle ) ;
1583
+ return THS_deviceType ( handle ) ;
1584
1584
}
1585
1585
}
1586
1586
@@ -1628,7 +1628,7 @@ public long GetTensorStride (int dim)
1628
1628
/// <summary>
1629
1629
/// Create a new tensor filled with ones
1630
1630
/// </summary>
1631
- static public ITorchTensor < float > Ones ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
1631
+ static public ITorchTensor < float > Ones ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
1632
1632
{
1633
1633
unsafe
1634
1634
{
@@ -1645,7 +1645,7 @@ static public ITorchTensor<float> Ones(long[] size, string device = "cpu:0", boo
1645
1645
/// <summary>
1646
1646
/// Create a new tensor filled with ones
1647
1647
/// </summary>
1648
- static public ITorchTensor < float > RandomN ( long [ ] size , string device = "cpu:0 " , bool requiresGrad = false )
1648
+ static public ITorchTensor < float > RandomN ( long [ ] size , string device = "cpu" , bool requiresGrad = false )
1649
1649
{
1650
1650
unsafe
1651
1651
{
0 commit comments