Skip to content

Commit 9a1798c

Browse files
Applications skeleton methods added
1 parent 68f604c commit 9a1798c

13 files changed

Lines changed: 218 additions & 12 deletions

File tree

‎src/TensorFlowNET.Keras/Applications/Densenet.cs‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,21 @@ public class Densenet
1515
public static Model DenseNet(int blocks, bool include_top=true, string weights = "imagenet",
1616
Tensor input_tensor = null, TensorShape input_shape = null,
1717
string pooling = null, int classes = 1000) => throw new NotImplementedException();
18+
19+
public static Model DenseNet121(int blocks, bool include_top = true, string weights = "imagenet",
20+
Tensor input_tensor = null, TensorShape input_shape = null,
21+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
22+
23+
public static Model DenseNet169(int blocks, bool include_top = true, string weights = "imagenet",
24+
Tensor input_tensor = null, TensorShape input_shape = null,
25+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
26+
27+
public static Model DenseNet201(int blocks, bool include_top = true, string weights = "imagenet",
28+
Tensor input_tensor = null, TensorShape input_shape = null,
29+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
30+
31+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
32+
33+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
1834
}
1935
}

‎src/TensorFlowNET.Keras/Applications/Efficientnet.cs‎

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,57 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class Efficientnet
7+
public class BlockArg
88
{
9+
10+
}
11+
12+
public class Efficientnet
13+
{
14+
public static Model EfficientNet(float width_coefficient, float depth_coefficient, int default_size, float dropout_rate = 0.2f,
15+
float drop_connect_rate = 0.2f, int depth_divisor = 8, string activation = "swish",
16+
BlockArg[] blocks_args = null, string model_name = "efficientnet", bool include_top = true,
17+
string weights = "imagenet", Tensor input_tensor = null, TensorShape input_shape = null,
18+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
19+
20+
public static Tensor block(Tensor inputs, string activation= "swish", float drop_rate= 0f,string name= "",
21+
int filters_in= 32, int filters_out= 16, int kernel_size= 3, int strides= 1,
22+
int expand_ratio= 1, float se_ratio= 0, bool id_skip= true) => throw new NotImplementedException();
23+
24+
public static Model EfficientNetB0(bool include_top = true, string weights = "imagenet",
25+
Tensor input_tensor = null, TensorShape input_shape = null,
26+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
27+
28+
public static Model EfficientNetB1(bool include_top = true, string weights = "imagenet",
29+
Tensor input_tensor = null, TensorShape input_shape = null,
30+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
31+
32+
public static Model EfficientNetB2(bool include_top = true, string weights = "imagenet",
33+
Tensor input_tensor = null, TensorShape input_shape = null,
34+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
35+
36+
public static Model EfficientNetB3(bool include_top = true, string weights = "imagenet",
37+
Tensor input_tensor = null, TensorShape input_shape = null,
38+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
39+
40+
public static Model EfficientNetB4(bool include_top = true, string weights = "imagenet",
41+
Tensor input_tensor = null, TensorShape input_shape = null,
42+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
43+
44+
public static Model EfficientNetB5(bool include_top = true, string weights = "imagenet",
45+
Tensor input_tensor = null, TensorShape input_shape = null,
46+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
47+
48+
public static Model EfficientNetB6(bool include_top = true, string weights = "imagenet",
49+
Tensor input_tensor = null, TensorShape input_shape = null,
50+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
51+
52+
public static Model EfficientNetB7(bool include_top = true, string weights = "imagenet",
53+
Tensor input_tensor = null, TensorShape input_shape = null,
54+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
55+
56+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
57+
58+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
959
}
1060
}

‎src/TensorFlowNET.Keras/Applications/ImagenetUtils.cs‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class ImagenetUtils
7+
public class ImagenetUtils
88
{
9+
public static Tensor preprocess_input(Tensor x, string data_format= null, string mode= "caffe") => throw new NotImplementedException();
10+
11+
public static Tensor decode_predictions(Tensor preds, int top= 5) => throw new NotImplementedException();
12+
13+
public static Tensor _preprocess_numpy_input(Tensor x, string data_format, string mode) => throw new NotImplementedException();
14+
15+
public static Tensor _preprocess_symbolic_input(Tensor x, string data_format, string mode) => throw new NotImplementedException();
16+
17+
public static TensorShape obtain_input_shape(TensorShape input_shape, int default_size, int min_size,
18+
string data_format, bool require_flatten, string weights= null) => throw new NotImplementedException();
19+
20+
public static ((int, int), (int, int)) correct_pad(Tensor inputs, (int, int) kernel_size) => throw new NotImplementedException();
921
}
1022
}

‎src/TensorFlowNET.Keras/Applications/InceptionResnetV2.cs‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class InceptionResnetV2
7+
public class InceptionResnetV2
88
{
9+
public static Model InceptionResNetV2(bool include_top = true, string weights = "imagenet",
10+
Tensor input_tensor = null, TensorShape input_shape = null,
11+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
12+
13+
public static Tensor conv2d_bn(Tensor x, int filters, (int, int) kernel_size, (int, int) strides, string padding= "same",
14+
string activation= "relu", bool use_bias= false, string name= null) => throw new NotImplementedException();
15+
16+
public static Tensor inception_resnet_block(Tensor x, float scale, string block_type, int block_idx, string activation= "relu") => throw new NotImplementedException();
17+
18+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
19+
20+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
921
}
1022
}

‎src/TensorFlowNET.Keras/Applications/InceptionV3.cs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class InceptionV3
7+
public class InceptionV3
88
{
9+
public static Model Inceptionv3(bool include_top = true, string weights = "imagenet",
10+
Tensor input_tensor = null, TensorShape input_shape = null,
11+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
12+
13+
public static Tensor conv2d_bn(Tensor x, int filters, int num_row, int num_col, string padding = "same", (int, int)? strides = null, string name = null) => throw new NotImplementedException();
14+
15+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
16+
17+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
918
}
1019
}

‎src/TensorFlowNET.Keras/Applications/Mobilenet.cs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class Mobilenet
7+
public class Mobilenet
88
{
9+
public static Model MobileNet(TensorShape input_shape= null, float alpha= 1.0f, int depth_multiplier= 1, float dropout= 1e-3f,
10+
bool include_top= true, string weights= "imagenet", Tensor input_tensor= null, string pooling= null, int classes= 1000) => throw new NotImplementedException();
11+
12+
public static Tensor conv2d_bn(Tensor x, int filters, float alpha, (int, int)? kernel = null, (int, int)? strides = null) => throw new NotImplementedException();
13+
14+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
15+
16+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
917
}
1018
}

‎src/TensorFlowNET.Keras/Applications/MobilenetV2.cs‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class MobilenetV2
7+
public class MobilenetV2
88
{
9+
public static Model MobileNetV2(TensorShape input_shape = null, float alpha = 1.0f, bool include_top = true,
10+
string weights = "imagenet", Tensor input_tensor = null, string pooling = null,
11+
int classes = 1000) => throw new NotImplementedException();
12+
13+
public static Tensor _inverted_res_block(Tensor inputs, int expansion, (int, int) stride, float alpha, int filters, string block_id) => throw new NotImplementedException();
14+
15+
public static Tensor _make_divisible(Tensor v, Tensor divisor, Tensor min_value= null) => throw new NotImplementedException();
16+
17+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
18+
19+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
920
}
1021
}

‎src/TensorFlowNET.Keras/Applications/Nasnet.cs‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,28 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class Nasnet
7+
public class Nasnet
88
{
9+
public static Model NASNet(TensorShape input_shape = null, int penultimate_filters = 4032, int num_blocks = 6, int stem_block_filters = 96,
10+
bool skip_reduction = true, int filter_multiplier = 2, bool include_top = true, string weights = null,
11+
Tensor input_tensor = null, string pooling = null, int classes = 1000, int? default_size = null) => throw new NotImplementedException();
12+
13+
public static Model NASNetMobile(TensorShape input_shape = null, bool include_top = true, string weights = "imagenet",
14+
Tensor input_tensor = null, string pooling = null, int classes = 1000) => throw new NotImplementedException();
15+
16+
public static Model NASNetLarge(TensorShape input_shape = null, bool include_top = true, string weights = "imagenet",
17+
Tensor input_tensor = null, string pooling = null, int classes = 1000) => throw new NotImplementedException();
18+
19+
public static Tensor _separable_conv_block(Tensor ip, int filters, (int, int)? kernel_size= null, (int, int)? strides= null, string block_id= null) => throw new NotImplementedException();
20+
21+
public static Tensor _adjust_block(Tensor p, Tensor ip, int filters, string block_id= null) => throw new NotImplementedException();
22+
23+
public static Tensor _normal_a_cell(Tensor p, Tensor ip, int filters, string block_id = null) => throw new NotImplementedException();
24+
25+
public static Tensor _reduction_a_cell(Tensor p, Tensor ip, int filters, string block_id = null) => throw new NotImplementedException();
26+
27+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
28+
29+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
930
}
1031
}

‎src/TensorFlowNET.Keras/Applications/Resnet.cs‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,38 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class Resnet
7+
public class Resnet
88
{
9+
public static Model ResNet(Func<Tensor, Tensor> stack_fn, bool preact, bool use_bias, string model_name= "resnet", bool include_top= true,
10+
string weights= "imagenet", Tensor input_tensor= null, TensorShape input_shape= null, string pooling= null,
11+
int classes= 1000) => throw new NotImplementedException();
12+
13+
public static Tensor block1(Tensor x, int filters, int kernel_size= 3, int stride= 1, bool conv_shortcut= true, string name= null) => throw new NotImplementedException();
14+
15+
public static Tensor stack1(Tensor x, int filters, int blocks, int stride1 = 2, string name = null) => throw new NotImplementedException();
16+
17+
public static Tensor block2(Tensor x, int filters, int kernel_size = 3, int stride = 1, bool conv_shortcut = true, string name = null) => throw new NotImplementedException();
18+
19+
public static Tensor stack2(Tensor x, int filters, int blocks, int stride1 = 2, string name = null) => throw new NotImplementedException();
20+
21+
public static Tensor block3(Tensor x, int filters, int kernel_size = 3, int stride = 1, int groups = 32, bool conv_shortcut = true, string name = null) => throw new NotImplementedException();
22+
23+
public static Tensor stack3(Tensor x, int filters, int blocks, int stride1 = 2, int groups = 32, string name = null) => throw new NotImplementedException();
24+
25+
public static Model ResNet50(bool include_top = true, string weights = "imagenet",
26+
Tensor input_tensor = null, TensorShape input_shape = null,
27+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
28+
29+
public static Model ResNet101(bool include_top = true, string weights = "imagenet",
30+
Tensor input_tensor = null, TensorShape input_shape = null,
31+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
32+
33+
public static Model ResNet152(bool include_top = true, string weights = "imagenet",
34+
Tensor input_tensor = null, TensorShape input_shape = null,
35+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
36+
37+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
38+
39+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
940
}
1041
}

‎src/TensorFlowNET.Keras/Applications/ResnetV2.cs‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,22 @@
44

55
namespace Tensorflow.Keras.Applications
66
{
7-
class ResnetV2
7+
public class ResnetV2
88
{
9+
public static Model ResNet50V2(bool include_top = true, string weights = "imagenet",
10+
Tensor input_tensor = null, TensorShape input_shape = null,
11+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
12+
13+
public static Model ResNet101V2(bool include_top = true, string weights = "imagenet",
14+
Tensor input_tensor = null, TensorShape input_shape = null,
15+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
16+
17+
public static Model ResNet152V2(bool include_top = true, string weights = "imagenet",
18+
Tensor input_tensor = null, TensorShape input_shape = null,
19+
string pooling = null, int classes = 1000) => throw new NotImplementedException();
20+
21+
public static Tensor preprocess_input(Tensor x, string data_format = null) => throw new NotImplementedException();
22+
23+
public static Tensor decode_predictions(Tensor preds, int top = 5) => throw new NotImplementedException();
924
}
1025
}

0 commit comments

Comments
 (0)