├── .gitignore ├── CodeMinion.sln ├── LICENSE ├── README.md ├── art ├── Logo.md ├── code_minion-128x128-trans.ico ├── code_minion-128x128-trans.png ├── code_minion-128x128.ico ├── code_minion-128x128.png ├── code_minion-16x16-trans.png ├── code_minion.png ├── code_minion.svg ├── code_minion_icon.svg └── code_minion_icon_trans.svg ├── src ├── CodeMinion.ApiGenerator │ ├── CodeMinion.ApiGenerator.csproj │ ├── Keras │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── settings.json │ │ ├── ApiGenerator.cs │ │ ├── ExportSignatureToJson.py │ │ ├── README.md │ │ ├── Tmpl │ │ │ ├── ClassTmpl.txt │ │ │ └── MethodTmpl.txt │ │ └── sig.json │ ├── MxNet │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── settings.json │ │ ├── ApiGenerator.cs │ │ ├── ExportSignatureToJson - test.py │ │ ├── ExportSignatureToJson.py │ │ ├── ModuleExt.cs │ │ ├── README.md │ │ ├── Tmpl │ │ │ ├── ClassTmpl.txt │ │ │ ├── MethodTmpl.txt │ │ │ └── ModuleTmpl.txt │ │ └── sig.json │ ├── NumPy │ │ └── README.md │ ├── Pillow │ │ ├── ApiGenerator.cs │ │ └── README.md │ ├── Program.cs │ ├── PyTorch │ │ ├── ApiGenerator.cs │ │ ├── ApiGenerator.nn.cs │ │ ├── README.md │ │ └── Templates │ │ │ ├── CreateTensor.cs │ │ │ └── TensorMembers.cs │ └── SpaCy │ │ ├── ApiGenerator.cs │ │ └── README.md ├── CodeMinion.Core │ ├── Attributes │ │ ├── PartialClassTemplateAttribute.cs │ │ └── TemplateAttribute.cs │ ├── CodeGenerator.cs │ ├── CodeMinion.Core.csproj │ ├── FunctionBodyTemplate.cs │ ├── Helpers │ │ └── CodeWriter.cs │ ├── ICodeGenerator.cs │ └── Models │ │ ├── Argument.cs │ │ ├── Declaration.cs │ │ ├── DynamicApi.cs │ │ ├── Function.cs │ │ ├── Library │ │ ├── PyClass.cs │ │ ├── PyFuncArg.cs │ │ ├── PyFunction.cs │ │ ├── PyLibrary.cs │ │ └── PyModule.cs │ │ ├── Property.cs │ │ ├── StaticApi.cs │ │ ├── TestCase.cs │ │ └── TestFile.cs ├── CodeMinion.DocsParser │ ├── CodeMinion.Parser.csproj │ ├── DocumentExtensions.cs │ ├── HtmlDoc.cs │ ├── HtmlDocuParser.cs │ └── RegexExtensions.cs ├── MxNet │ ├── Base.cs │ ├── Context.cs │ ├── DType.cs │ ├── Helper │ │ └── DictSolver.cs │ ├── IPyClass.cs │ ├── Initializer.cs │ ├── MxNet.csproj │ ├── MxNetLib.cs │ ├── ND │ │ ├── CachedOp.cs │ │ └── NDArrayBase.cs │ ├── NDArray.cs │ ├── Python.cs │ ├── PythonObject.cs │ ├── Shape.cs │ ├── StringOrInitializer.cs │ ├── Symbol.cs │ ├── autograd │ │ ├── Autograd.cs │ │ └── Function.cs │ ├── callback │ │ ├── Callback.cs │ │ ├── LogValidationMetricsCallback.cs │ │ ├── ProgressBar.cs │ │ └── Speedometer.cs │ ├── collections │ │ └── Counter.cs │ ├── contrib │ │ ├── onnx │ │ │ ├── MX2Onnx.cs │ │ │ └── Onnx2Mx.cs │ │ └── text │ │ │ ├── CompositeEmbedding.cs │ │ │ ├── CustomEmbedding.cs │ │ │ ├── Embedding.cs │ │ │ ├── FastText.cs │ │ │ ├── GloVe.cs │ │ │ ├── Utils.cs │ │ │ └── Vocabulary.cs │ ├── gluon │ │ ├── NN │ │ │ ├── Activation.cs │ │ │ ├── AvgPool1D.cs │ │ │ ├── AvgPool2D.cs │ │ │ ├── AvgPool3D.cs │ │ │ ├── BatchNorm.cs │ │ │ ├── Block.cs │ │ │ ├── Conv1D.cs │ │ │ ├── Conv1DTranspose.cs │ │ │ ├── Conv2D.cs │ │ │ ├── Conv2DTranspose.cs │ │ │ ├── Conv3D.cs │ │ │ ├── Conv3DTranspose.cs │ │ │ ├── Dense.cs │ │ │ ├── Dropout.cs │ │ │ ├── ELU.cs │ │ │ ├── Embedding.cs │ │ │ ├── Flatten.cs │ │ │ ├── GlobalAvgPool1D.cs │ │ │ ├── GlobalAvgPool2D.cs │ │ │ ├── GlobalAvgPool3D.cs │ │ │ ├── GlobalMaxPool1D.cs │ │ │ ├── GlobalMaxPool2D.cs │ │ │ ├── GlobalMaxPool3D.cs │ │ │ ├── HybridBlock.cs │ │ │ ├── HybridLambda.cs │ │ │ ├── HybridSequential.cs │ │ │ ├── InstanceNorm.cs │ │ │ ├── Lambda.cs │ │ │ ├── LayerNorm.cs │ │ │ ├── LeakyReLU.cs │ │ │ ├── MaxPool1D.cs │ │ │ ├── MaxPool2D.cs │ │ │ ├── MaxPool3D.cs │ │ │ ├── PReLU.cs │ │ │ ├── ReflectionPad2D.cs │ │ │ ├── SELU.cs │ │ │ ├── Sequential.cs │ │ │ └── Swish.cs │ │ └── SymbolBlock.cs │ ├── image │ │ ├── AKAZE.cs │ │ ├── AgastFeatureDetector.cs │ │ ├── Algorithm.cs │ │ ├── AlignExposures.cs │ │ ├── AlignMTB.cs │ │ ├── BFMatcher.cs │ │ ├── BOWImgDescriptorExtractor.cs │ │ ├── BOWKMeansTrainer.cs │ │ ├── BOWTrainer.cs │ │ ├── BRISK.cs │ │ ├── BackgroundSubtractor.cs │ │ ├── BackgroundSubtractorKNN.cs │ │ ├── BackgroundSubtractorMOG2.cs │ │ ├── BaseCascadeClassifier.cs │ │ ├── CLAHE.cs │ │ ├── CalibrateCRF.cs │ │ ├── CalibrateDebevec.cs │ │ ├── CalibrateRobertson.cs │ │ ├── CascadeClassifier.cs │ │ ├── CirclesGridFinderParameters.cs │ │ ├── DISOpticalFlow.cs │ │ ├── DMatch.cs │ │ ├── DenseOpticalFlow.cs │ │ ├── DescriptorMatcher.cs │ │ ├── FarnebackOpticalFlow.cs │ │ ├── FastFeatureDetector.cs │ │ ├── Feature2D.cs │ │ ├── FileNode.cs │ │ ├── FileStorage.cs │ │ ├── FlannBasedMatcher.cs │ │ ├── GFTTDetector.cs │ │ ├── GeneralizedHough.cs │ │ ├── GeneralizedHoughBallard.cs │ │ ├── GeneralizedHoughGuil.cs │ │ ├── HOGDescriptor.cs │ │ ├── KAZE.cs │ │ ├── KalmanFilter.cs │ │ ├── KeyPoint.cs │ │ ├── LineSegmentDetector.cs │ │ ├── MSER.cs │ │ ├── MergeDebevec.cs │ │ ├── MergeExposures.cs │ │ ├── MergeMertens.cs │ │ ├── MergeRobertson.cs │ │ ├── ORB.cs │ │ ├── PyRotationWarper.cs │ │ ├── QRCodeDetector.cs │ │ ├── SimpleBlobDetector.cs │ │ ├── SimpleBlobDetector_Params.cs │ │ ├── SparseOpticalFlow.cs │ │ ├── SparsePyrLKOpticalFlow.cs │ │ ├── StereoBM.cs │ │ ├── StereoMatcher.cs │ │ ├── StereoSGBM.cs │ │ ├── Stitcher.cs │ │ ├── Subdiv2D.cs │ │ ├── TickMeter.cs │ │ ├── Tonemap.cs │ │ ├── TonemapDrago.cs │ │ ├── TonemapMantiuk.cs │ │ ├── TonemapReinhard.cs │ │ ├── UMat.cs │ │ ├── VariationalRefinement.cs │ │ ├── VideoCapture.cs │ │ ├── VideoWriter.cs │ │ ├── WarperCreator.cs │ │ ├── cuda_BufferPool.cs │ │ ├── cuda_DeviceInfo.cs │ │ ├── cuda_Event.cs │ │ ├── cuda_GpuMat.cs │ │ ├── cuda_GpuMat_Allocator.cs │ │ ├── cuda_HostMem.cs │ │ ├── cuda_Stream.cs │ │ ├── cuda_TargetArchs.cs │ │ ├── detail_AffineBasedEstimator.cs │ │ ├── detail_AffineBestOf2NearestMatcher.cs │ │ ├── detail_BestOf2NearestMatcher.cs │ │ ├── detail_BestOf2NearestRangeMatcher.cs │ │ ├── detail_Blender.cs │ │ ├── detail_BlocksChannelsCompensator.cs │ │ ├── detail_BlocksCompensator.cs │ │ ├── detail_BlocksGainCompensator.cs │ │ ├── detail_BundleAdjusterAffine.cs │ │ ├── detail_BundleAdjusterAffinePartial.cs │ │ ├── detail_BundleAdjusterBase.cs │ │ ├── detail_BundleAdjusterRay.cs │ │ ├── detail_BundleAdjusterReproj.cs │ │ ├── detail_CameraParams.cs │ │ ├── detail_ChannelsCompensator.cs │ │ ├── detail_DpSeamFinder.cs │ │ ├── detail_Estimator.cs │ │ ├── detail_ExposureCompensator.cs │ │ ├── detail_FeatherBlender.cs │ │ ├── detail_FeaturesMatcher.cs │ │ ├── detail_GainCompensator.cs │ │ ├── detail_GraphCutSeamFinder.cs │ │ ├── detail_HomographyBasedEstimator.cs │ │ ├── detail_ImageFeatures.cs │ │ ├── detail_MatchesInfo.cs │ │ ├── detail_MultiBandBlender.cs │ │ ├── detail_NoBundleAdjuster.cs │ │ ├── detail_NoExposureCompensator.cs │ │ ├── detail_NoSeamFinder.cs │ │ ├── detail_PairwiseSeamFinder.cs │ │ ├── detail_ProjectorBase.cs │ │ ├── detail_SeamFinder.cs │ │ ├── detail_SphericalProjector.cs │ │ ├── detail_Timelapser.cs │ │ ├── detail_TimelapserCrop.cs │ │ ├── detail_VoronoiSeamFinder.cs │ │ ├── dnn_DictValue.cs │ │ ├── dnn_Layer.cs │ │ ├── dnn_Net.cs │ │ ├── error.cs │ │ ├── flann_Index.cs │ │ ├── ml_ANN_MLP.cs │ │ ├── ml_Boost.cs │ │ ├── ml_DTrees.cs │ │ ├── ml_EM.cs │ │ ├── ml_KNearest.cs │ │ ├── ml_LogisticRegression.cs │ │ ├── ml_NormalBayesClassifier.cs │ │ ├── ml_ParamGrid.cs │ │ ├── ml_RTrees.cs │ │ ├── ml_SVM.cs │ │ ├── ml_SVMSGD.cs │ │ ├── ml_StatModel.cs │ │ ├── ml_TrainData.cs │ │ └── ocl_Device.cs │ ├── logging │ │ ├── Logger.cs │ │ └── Logging.cs │ └── module │ │ ├── BaseModule.cs │ │ └── Module.cs ├── PillowSharp │ └── PillowSharp.csproj ├── Python.Included │ ├── Installer.cs │ ├── Python.Included.csproj │ ├── PythonEnv.cs │ └── Resources │ │ └── python-3.7.3-embed-amd64.zip └── Torch │ ├── Manual │ └── torch.cs │ ├── Models │ ├── Device.cs │ ├── Dtype.cs │ ├── Extensions.cs │ ├── Layout.cs │ ├── PythonObject.cs │ ├── PythonObject.gen.cs │ ├── Storage.cs │ ├── Tensor.CastOperators.cs │ ├── Tensor.Operators.cs │ ├── Tensor.cs │ ├── Tensor.gen.cs │ ├── nn │ │ ├── Manual │ │ │ ├── torch.nn.Module.cs │ │ │ ├── torch.nn.ModuleDict.cs │ │ │ ├── torch.nn.ModuleList.cs │ │ │ ├── torch.nn.Parameter.cs │ │ │ ├── torch.nn.ParameterDict.cs │ │ │ ├── torch.nn.ParameterList.cs │ │ │ ├── torch.nn.Sequential.cs │ │ │ ├── torch.nn.parallel.DistributedDataParallelCPU.cs │ │ │ └── torch.nn.utils.rnn.PackedSequence.cs │ │ ├── torch.nn.AdaptiveAvgPool1d.gen.cs │ │ ├── torch.nn.AdaptiveAvgPool2d.gen.cs │ │ ├── torch.nn.AdaptiveAvgPool3d.gen.cs │ │ ├── torch.nn.AdaptiveLogSoftmaxWithLoss.gen.cs │ │ ├── torch.nn.AdaptiveMaxPool1d.gen.cs │ │ ├── torch.nn.AdaptiveMaxPool2d.gen.cs │ │ ├── torch.nn.AdaptiveMaxPool3d.gen.cs │ │ ├── torch.nn.AlphaDropout.gen.cs │ │ ├── torch.nn.AvgPool1d.gen.cs │ │ ├── torch.nn.AvgPool2d.gen.cs │ │ ├── torch.nn.AvgPool3d.gen.cs │ │ ├── torch.nn.BCELoss.gen.cs │ │ ├── torch.nn.BCEWithLogitsLoss.gen.cs │ │ ├── torch.nn.BatchNorm1d.gen.cs │ │ ├── torch.nn.BatchNorm2d.gen.cs │ │ ├── torch.nn.BatchNorm3d.gen.cs │ │ ├── torch.nn.Bilinear.gen.cs │ │ ├── torch.nn.CELU.gen.cs │ │ ├── torch.nn.CTCLoss.gen.cs │ │ ├── torch.nn.ConstantPad1d.gen.cs │ │ ├── torch.nn.ConstantPad2d.gen.cs │ │ ├── torch.nn.ConstantPad3d.gen.cs │ │ ├── torch.nn.Conv1d.gen.cs │ │ ├── torch.nn.Conv2d.gen.cs │ │ ├── torch.nn.Conv3d.gen.cs │ │ ├── torch.nn.ConvTranspose1d.gen.cs │ │ ├── torch.nn.ConvTranspose2d.gen.cs │ │ ├── torch.nn.ConvTranspose3d.gen.cs │ │ ├── torch.nn.CosineEmbeddingLoss.gen.cs │ │ ├── torch.nn.CosineSimilarity.gen.cs │ │ ├── torch.nn.CrossEntropyLoss.gen.cs │ │ ├── torch.nn.DataParallel.gen.cs │ │ ├── torch.nn.Dropout.gen.cs │ │ ├── torch.nn.Dropout2d.gen.cs │ │ ├── torch.nn.Dropout3d.gen.cs │ │ ├── torch.nn.ELU.gen.cs │ │ ├── torch.nn.Embedding.gen.cs │ │ ├── torch.nn.EmbeddingBag.gen.cs │ │ ├── torch.nn.Fold.gen.cs │ │ ├── torch.nn.FractionalMaxPool2d.gen.cs │ │ ├── torch.nn.GRU.gen.cs │ │ ├── torch.nn.GRUCell.gen.cs │ │ ├── torch.nn.GroupNorm.gen.cs │ │ ├── torch.nn.Hardshrink.gen.cs │ │ ├── torch.nn.Hardtanh.gen.cs │ │ ├── torch.nn.HingeEmbeddingLoss.gen.cs │ │ ├── torch.nn.Identity.gen.cs │ │ ├── torch.nn.InstanceNorm1d.gen.cs │ │ ├── torch.nn.InstanceNorm2d.gen.cs │ │ ├── torch.nn.InstanceNorm3d.gen.cs │ │ ├── torch.nn.KLDivLoss.gen.cs │ │ ├── torch.nn.L1Loss.gen.cs │ │ ├── torch.nn.LPPool1d.gen.cs │ │ ├── torch.nn.LPPool2d.gen.cs │ │ ├── torch.nn.LSTM.gen.cs │ │ ├── torch.nn.LSTMCell.gen.cs │ │ ├── torch.nn.LayerNorm.gen.cs │ │ ├── torch.nn.LeakyReLU.gen.cs │ │ ├── torch.nn.Linear.gen.cs │ │ ├── torch.nn.LocalResponseNorm.gen.cs │ │ ├── torch.nn.LogSigmoid.gen.cs │ │ ├── torch.nn.LogSoftmax.gen.cs │ │ ├── torch.nn.MSELoss.gen.cs │ │ ├── torch.nn.MarginRankingLoss.gen.cs │ │ ├── torch.nn.MaxPool1d.gen.cs │ │ ├── torch.nn.MaxPool2d.gen.cs │ │ ├── torch.nn.MaxPool3d.gen.cs │ │ ├── torch.nn.MaxUnpool1d.gen.cs │ │ ├── torch.nn.MaxUnpool2d.gen.cs │ │ ├── torch.nn.MaxUnpool3d.gen.cs │ │ ├── torch.nn.MultiLabelMarginLoss.gen.cs │ │ ├── torch.nn.MultiLabelSoftMarginLoss.gen.cs │ │ ├── torch.nn.MultiMarginLoss.gen.cs │ │ ├── torch.nn.MultiheadAttention.gen.cs │ │ ├── torch.nn.NLLLoss.gen.cs │ │ ├── torch.nn.PReLU.gen.cs │ │ ├── torch.nn.PairwiseDistance.gen.cs │ │ ├── torch.nn.PixelShuffle.gen.cs │ │ ├── torch.nn.PoissonNLLLoss.gen.cs │ │ ├── torch.nn.RNN.gen.cs │ │ ├── torch.nn.RNNCell.gen.cs │ │ ├── torch.nn.RReLU.gen.cs │ │ ├── torch.nn.ReLU.gen.cs │ │ ├── torch.nn.ReLU6.gen.cs │ │ ├── torch.nn.ReflectionPad1d.gen.cs │ │ ├── torch.nn.ReflectionPad2d.gen.cs │ │ ├── torch.nn.ReplicationPad1d.gen.cs │ │ ├── torch.nn.ReplicationPad2d.gen.cs │ │ ├── torch.nn.ReplicationPad3d.gen.cs │ │ ├── torch.nn.SELU.gen.cs │ │ ├── torch.nn.Sigmoid.gen.cs │ │ ├── torch.nn.SmoothL1Loss.gen.cs │ │ ├── torch.nn.SoftMarginLoss.gen.cs │ │ ├── torch.nn.Softmax.gen.cs │ │ ├── torch.nn.Softmax2d.gen.cs │ │ ├── torch.nn.Softmin.gen.cs │ │ ├── torch.nn.Softplus.gen.cs │ │ ├── torch.nn.Softshrink.gen.cs │ │ ├── torch.nn.Softsign.gen.cs │ │ ├── torch.nn.SyncBatchNorm.gen.cs │ │ ├── torch.nn.Tanh.gen.cs │ │ ├── torch.nn.Tanhshrink.gen.cs │ │ ├── torch.nn.Threshold.gen.cs │ │ ├── torch.nn.TripletMarginLoss.gen.cs │ │ ├── torch.nn.Unfold.gen.cs │ │ ├── torch.nn.Upsample.gen.cs │ │ ├── torch.nn.UpsamplingBilinear2d.gen.cs │ │ ├── torch.nn.UpsamplingNearest2d.gen.cs │ │ ├── torch.nn.ZeroPad2d.gen.cs │ │ └── torch.nn.parallel.DistributedDataParallel.gen.cs │ └── utils │ │ └── RemovableHandle.cs │ ├── Torch.csproj │ ├── torch.gen.cs │ ├── torch.module.gen.cs │ ├── torch.nn.functional.gen.cs │ ├── torch.nn.init.gen.cs │ └── torch.nn.util.gen.cs └── test └── Torch.UnitTest ├── BaseTestCase.cs ├── PyTorch_.tests.cs ├── PyTorch_nn.functional.tests.cs ├── PyTorch_nn.init.tests.cs ├── PyTorch_nn.util.tests.cs ├── Tensor_.tests.cs ├── Torch.UnitTest.csproj ├── TorchTest.cs └── nn ├── Module.tests.cs └── NN_tests.cs /README.md: -------------------------------------------------------------------------------- 1 | ![CodeMinion](art/code_minion-128x128-trans.png) 2 | 3 | # CodeMinion 4 | A code generator framework written by the SciSharp team to generate the APIs of several SciSharp libraries. You code the intersting parts, the minion writes the rest for you. 5 | 6 | The framework consists of code generator named **The Minion**. 7 | 8 | ## The Minion 9 | The Minion is capable of generating the source code of entire libraries from model definitions and is currently specialized on wrapping Python libraries using Pythonnet. The model definitions are usually harvested off of HTML documentation pages. 10 | 11 | ### Generated by the Minion 12 | These libraries have been generated by CodeMinion from Python docs: 13 | * [Numpy.NET](https://github.com/SciSharp/Numpy.NET) ... 39,103 lines of code (mostly done) 14 | * [Torch.NET](https://github.com/SciSharp/Torch.NET) ... 10,767 lines of code (work in progress) 15 | * [Keras.NET](https://github.com/SciSharp/Keras.NET) ... 7,573 lines of code (mostly done) 16 | * [SpaCy.NET](https://github.com/SciSharp/SpaCy.NET) ... (work in progress) 17 | 18 | ### Contributing to CodeMinion 19 | Any help is appreciated. If you fix bugs or improve anything please send a PR. 20 | 21 | * Be sure not to make manual changes in generated files! Instead the generator has to be fixed 22 | * When changing the generator, generate the code for all generated projects (i.e. Numpy.NET and Torch.NET) and check the changes in the generated code (i.e. by looking over the git diff) to see that nothing broke. 23 | * When you check in changes in the generator, please also check in the changes it has on the generated code. 24 | -------------------------------------------------------------------------------- /art/Logo.md: -------------------------------------------------------------------------------- 1 | CodeMinion logo (c) 2019 by Meinrad Recheis. -------------------------------------------------------------------------------- /art/code_minion-128x128-trans.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SciSharp/CodeMinion/b45346fc7501deaa2933c0040b4ddb2e1e33546e/art/code_minion-128x128-trans.ico -------------------------------------------------------------------------------- /art/code_minion-128x128-trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SciSharp/CodeMinion/b45346fc7501deaa2933c0040b4ddb2e1e33546e/art/code_minion-128x128-trans.png -------------------------------------------------------------------------------- /art/code_minion-128x128.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SciSharp/CodeMinion/b45346fc7501deaa2933c0040b4ddb2e1e33546e/art/code_minion-128x128.ico -------------------------------------------------------------------------------- /art/code_minion-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SciSharp/CodeMinion/b45346fc7501deaa2933c0040b4ddb2e1e33546e/art/code_minion-128x128.png -------------------------------------------------------------------------------- /art/code_minion-16x16-trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SciSharp/CodeMinion/b45346fc7501deaa2933c0040b4ddb2e1e33546e/art/code_minion-16x16-trans.png -------------------------------------------------------------------------------- /art/code_minion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SciSharp/CodeMinion/b45346fc7501deaa2933c0040b4ddb2e1e33546e/art/code_minion.png -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/CodeMinion.ApiGenerator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | PreserveNewest 21 | 22 | 23 | PreserveNewest 24 | 25 | 26 | PreserveNewest 27 | 28 | 29 | PreserveNewest 30 | 31 | 32 | PreserveNewest 33 | 34 | 35 | PreserveNewest 36 | 37 | 38 | PreserveNewest 39 | 40 | 41 | PreserveNewest 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Keras/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python: Current File", 9 | "type": "python", 10 | "request": "launch", 11 | "program": "${file}", 12 | "console": "integratedTerminal" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Keras/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "C:\\Python\\Python36\\python.exe", 3 | "python.linting.pylintEnabled": true, 4 | "python.linting.enabled": true 5 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Keras/README.md: -------------------------------------------------------------------------------- 1 | # Keras 2 | Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research. 3 | 4 | https://keras.io/ -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Keras/Tmpl/ClassTmpl.txt: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace Keras.[MODULE] 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class [CLSNAME] : Base 12 | { 13 | private static dynamic caller = Instance.keras.[MODULE].[CLSNAME]; 14 | public [CLSNAME]([ARGS]) 15 | { 16 | [PARAMETERS] 17 | __self__ = caller; 18 | } 19 | 20 | [METHODS] 21 | } 22 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Keras/Tmpl/MethodTmpl.txt: -------------------------------------------------------------------------------- 1 | public {0} {1} {2}([ARGS]) 2 | { 3 | Dictionary parameters = new Dictionary(); 4 | [PARAMETERS] 5 | var res = InvokeStaticMethod(caller, "{1}", parameters); 6 | [RETURN] 7 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/MxNet/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python: Current File", 9 | "type": "python", 10 | "request": "launch", 11 | "program": "${file}", 12 | "console": "integratedTerminal" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/MxNet/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "C:\\Python\\Python36\\python.exe", 3 | "python.linting.pylintEnabled": true, 4 | "python.linting.enabled": true 5 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/MxNet/README.md: -------------------------------------------------------------------------------- 1 | # Keras 2 | Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research. 3 | 4 | https://keras.io/ -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/MxNet/Tmpl/ClassTmpl.txt: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.[NAMESPACE] 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class [CLSNAME] : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.[MODULE].[CLSNAME]; 14 | public [CLSNAME]([ARGS]) 15 | { 16 | [PARAMETERS] 17 | __self__ = caller; 18 | } 19 | 20 | [METHODS] 21 | } 22 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/MxNet/Tmpl/MethodTmpl.txt: -------------------------------------------------------------------------------- 1 | public [STATIC] [RETURNTYPE] [METHODNAME]([ARGS]) 2 | { 3 | Dictionary parameters = new Dictionary(); 4 | [PARAMETERS] 5 | var res = InvokeStaticMethod(caller, "[METHODNAME]", parameters); 6 | [RETURN] 7 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/MxNet/Tmpl/ModuleTmpl.txt: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class [MODULE] : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.[MODULE]; 14 | 15 | [METHODS] 16 | } 17 | } -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/NumPy/README.md: -------------------------------------------------------------------------------- 1 | Note: the Numpy generator has been moved to the Numpy.NET project. -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Pillow/ApiGenerator.cs: -------------------------------------------------------------------------------- 1 | using CodeMinion.Core; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using Torch.ApiGenerator; 6 | 7 | namespace CodeMinion.ApiGenerator.Pillow 8 | { 9 | class ApiGenerator : ICodeGenerator 10 | { 11 | private CodeGenerator _generator; 12 | 13 | public string Generate() 14 | { 15 | throw new NotImplementedException(); 16 | } 17 | 18 | string BaseUrl = "https://pillow.readthedocs.io/en/stable/reference/"; 19 | 20 | public Dictionary LoadDocs() 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Pillow/README.md: -------------------------------------------------------------------------------- 1 | # Pillow 2 | ### PIL is the Python Imaging Library. 3 | 4 | https://pillow.readthedocs.io -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Torch.ApiGenerator; 3 | 4 | namespace CodeMinion.ApiGenerator 5 | { 6 | class Program 7 | { 8 | static void Main(string[] args) 9 | { 10 | ICodeGenerator generator = null; 11 | if (args.Length==0) 12 | throw new Exception("Please set the command line parameter to the project you want to generate."); 13 | switch (args[0].ToLower()) 14 | { 15 | case "numpy": 16 | //generator = new NumPy.ApiGenerator(); 17 | throw new NotSupportedException("The Numpy API generator has been moved to the Numpy.NET repository"); 18 | break; 19 | case "torch": 20 | generator = new PyTorch.ApiGenerator(); 21 | break; 22 | case "pillow": 23 | generator = new Pillow.ApiGenerator(); 24 | break; 25 | case "spacy": 26 | generator = new SpaCy.ApiGenerator(); 27 | break; 28 | case "keras": 29 | generator = new Keras.ApiGenerator(); 30 | break; 31 | case "mxnet": 32 | generator = new MxNet.ApiGenerator(); 33 | break; 34 | default: 35 | throw new Exception("Please assign what project you're working on."); 36 | } 37 | 38 | var result = generator.Generate(); 39 | 40 | Console.WriteLine(result); 41 | //Console.ReadKey(); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/PyTorch/README.md: -------------------------------------------------------------------------------- 1 | # PyTorch 2 | ### An open source deep learning platform that provides a seamless path from research prototyping to production deployment. 3 | 4 | https://pytorch.org -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/PyTorch/Templates/TensorMembers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using CodeMinion.Core.Attributes; 5 | 6 | namespace CodeMinion.ApiGenerator.PyTorch.Templates 7 | { 8 | [PartialClassTemplate("Tensor", "GetData")] 9 | public class TensorMembersGenerator 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/CodeMinion.ApiGenerator/SpaCy/README.md: -------------------------------------------------------------------------------- 1 | # spaCy 2 | ### Industrial-strength Natural Language Processing (NLP) with Python and Cython. 3 | 4 | https://spacy.io -------------------------------------------------------------------------------- /src/CodeMinion.Core/Attributes/PartialClassTemplateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CodeMinion.Core.Attributes 4 | { 5 | public class PartialClassTemplateAttribute : Attribute 6 | { 7 | public string ClassName { get; set; } 8 | public string MemberName { get; set; } 9 | 10 | public PartialClassTemplateAttribute(string class_name, string member_name) 11 | { 12 | ClassName = class_name; 13 | MemberName = member_name; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/CodeMinion.Core/Attributes/TemplateAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CodeMinion.Core.Attributes 4 | { 5 | 6 | public class TemplateAttribute : Attribute 7 | { 8 | public string ApiFunction { get; set; } 9 | 10 | public TemplateAttribute(string api_function) 11 | { 12 | ApiFunction = api_function; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/CodeMinion.Core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | C:\Users\henon\.nuget\packages\sliceanddice\1.0.0\lib\netstandard2.0\SliceAndDice.dll 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/FunctionBodyTemplate.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using CodeMinion.Core.Helpers; 3 | using CodeMinion.Core.Models; 4 | 5 | namespace CodeMinion.Core 6 | { 7 | 8 | public abstract class FunctionBodyTemplate 9 | { 10 | public abstract void GenerateBody(Function decl, CodeWriter s); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/ICodeGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Torch.ApiGenerator 6 | { 7 | public interface ICodeGenerator 8 | { 9 | string Generate(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/Argument.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | 3 | namespace CodeMinion.Core.Models 4 | { 5 | public class Argument 6 | { 7 | public bool IsNullable { get; set; } 8 | public bool IsValueType { get; set; } 9 | public string Name { get; set; } 10 | public string Type { get; set; } 11 | public string DefaultValue { get; set; } 12 | public bool IsNamedArg { get; set; } 13 | public string Description { get; set; } 14 | 15 | /// 16 | /// Before sending to Python convert to the given C# Type, only then convert to Python type 17 | /// 18 | public string ConvertToSharpType { get; set; } 19 | 20 | public int Position { get; set; } 21 | public bool IsReturnValue { get; set; } 22 | public string Tag { get; set; } 23 | 24 | /// 25 | /// This default value is not a compile time constant, so it can not be used as a C# default value in 26 | /// the function declaration. So if the parameter is passed as null it will be initialized with the given value. 27 | /// 28 | public string DefaultIfNull { get; set; } 29 | 30 | public bool PassOnlyIfNotNull { get; set; } 31 | public bool Ignore { get; set; } 32 | 33 | public Argument Clone() 34 | { 35 | return JObject.FromObject(this).ToObject(); 36 | } 37 | 38 | public void SetNullableOptional(string type, string @default = null) 39 | { 40 | Type = type; 41 | IsNullable = true; 42 | IsNamedArg = true; 43 | DefaultValue = @default; 44 | } 45 | 46 | public void SetType(string type, string @default=null) 47 | { 48 | Type = type; 49 | DefaultValue = @default; 50 | } 51 | 52 | public void MakeMandatory() 53 | { 54 | DefaultValue = null; 55 | IsNullable = false; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/Declaration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json.Linq; 3 | 4 | namespace CodeMinion.Core.Models 5 | { 6 | public class Declaration 7 | { 8 | /// 9 | /// Function name 10 | /// 11 | public string Name { get; set; } 12 | 13 | /// 14 | /// Class name is the name of the containing API class (i.e. "numpy"). 15 | /// If it is a nested class the class name contains all nesting levels (i.e. "numpy.core.records") 16 | /// 17 | public string ClassName { get; set; } 18 | public string GeneratedClassName { get; set; } 19 | 20 | public List Returns { get; set; } = new List(); 21 | public bool IsDeprecated { get; set; } 22 | public bool ManualOverride { get; set; } 23 | public bool CommentOut { get; set; } 24 | public string SharpOnlyPostfix { get; set; } 25 | 26 | /// 27 | /// Do not generate if true 28 | /// 29 | public bool Ignore { get; set; } 30 | 31 | /// 32 | /// Break into the Debugger when generating this declaration 33 | /// 34 | public bool DebuggerBreak { get; set; } 35 | 36 | public string Description { get; set; } 37 | 38 | public virtual Declaration Clone() 39 | { 40 | return Clone(); 41 | } 42 | 43 | public virtual T Clone() 44 | { 45 | return JObject.FromObject(this).ToObject(); 46 | } 47 | 48 | public string Tag { get; set; } 49 | 50 | public virtual void Sanitize() 51 | { 52 | 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/DynamicApi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using CodeMinion.Core.Helpers; 5 | 6 | namespace CodeMinion.Core.Models 7 | { 8 | /// 9 | /// Represents the methods of a non-static class which should be generated. 10 | /// 11 | /// Note: the class itself is set up manually, this only generates more methods into that class. 12 | /// To generate a full class from scratch use ApiClass 13 | /// 14 | public class DynamicApi : Api 15 | { 16 | /// 17 | /// Class name is the name of a non-static class, i.e. NDArray 18 | /// 19 | public string ClassName { get; set; } 20 | } 21 | 22 | /// 23 | /// Represents a non-static class which should be generated. 24 | /// 25 | public class ApiClass : Api 26 | { 27 | public string DocString; 28 | 29 | /// 30 | /// Class name is the name of a non-static class, i.e. NDArray 31 | /// 32 | public string ClassName { get; set; } 33 | 34 | /// 35 | /// Do not generate this class 36 | /// 37 | public bool Ignore { get; set; } 38 | 39 | public string BaseClass { get; set; } = "PythonObject"; 40 | 41 | public List Constructors = new List(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/Library/PyClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CodeMinion.Core.Models 6 | { 7 | /// 8 | /// Information about python class 9 | /// 10 | public class PyClass 11 | { 12 | public PyClass() 13 | { 14 | Parameters = new List(); 15 | } 16 | 17 | /// 18 | /// Gets or sets the name. 19 | /// 20 | /// 21 | /// The name. 22 | /// 23 | public string Name { get; set; } 24 | 25 | /// 26 | /// Gets or sets the functions. 27 | /// 28 | /// 29 | /// The functions. 30 | /// 31 | public PyFunction[] Functions { get; set; } 32 | 33 | /// 34 | /// Gets or sets the document string. 35 | /// 36 | /// 37 | /// The document string. 38 | /// 39 | public string DocStr { get; set; } 40 | 41 | /// 42 | /// Gets or sets the arguments. 43 | /// 44 | /// 45 | /// The arguments. 46 | /// 47 | public string[] Args { get; set; } 48 | 49 | /// 50 | /// Gets or sets the defaults. 51 | /// 52 | /// 53 | /// The defaults. 54 | /// 55 | public string[] Defaults { get; set; } 56 | 57 | /// 58 | /// Gets or sets the parameters. 59 | /// 60 | /// 61 | /// The parameters. 62 | /// 63 | public List Parameters { get; set; } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/Library/PyFuncArg.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CodeMinion.Core.Models 6 | { 7 | /// 8 | /// Function argument for the method 9 | /// 10 | public class PyFuncArg 11 | { 12 | /// 13 | /// Gets or sets the name. 14 | /// 15 | /// 16 | /// The name. 17 | /// 18 | public string Name { get; set; } 19 | 20 | /// 21 | /// Gets or sets the type of the data. 22 | /// 23 | /// 24 | /// The type of the data. 25 | /// 26 | public string DataType { get; set; } 27 | 28 | /// 29 | /// Gets or sets the enums. 30 | /// 31 | /// 32 | /// The enums. 33 | /// 34 | public string[] Enums { get; set; } 35 | 36 | /// 37 | /// Gets or sets a value indicating whether [have default]. 38 | /// 39 | /// 40 | /// true if [have default]; otherwise, false. 41 | /// 42 | public bool HaveDefault { get; set; } 43 | 44 | /// 45 | /// Gets or sets the default value. 46 | /// 47 | /// 48 | /// The default value. 49 | /// 50 | public object DefaultValue { get; set; } 51 | 52 | /// 53 | /// Gets or sets the argument comment. 54 | /// 55 | /// 56 | /// The argument comment. 57 | /// 58 | public string ArgComment { get; set; } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/Library/PyLibrary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CodeMinion.Core.Models 6 | { 7 | /// 8 | /// Instance of the python libray with modules and function 9 | /// 10 | public class PyLibrary 11 | { 12 | /// 13 | /// Gets or sets the modules. 14 | /// 15 | /// 16 | /// The modules. 17 | /// 18 | public List Modules { get; set; } 19 | 20 | /// 21 | /// Loads the json. 22 | /// 23 | /// The json. 24 | /// 25 | public static PyLibrary LoadJson(string json) 26 | { 27 | PyLibrary lib = new PyLibrary(); 28 | lib.Modules = Newtonsoft.Json.JsonConvert.DeserializeObject>(json); 29 | //lib.Modules.ForEach(x => { x.InferArg(); }); 30 | return lib; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/Property.cs: -------------------------------------------------------------------------------- 1 | namespace CodeMinion.Core.Models 2 | { 3 | public class Property : Declaration 4 | { 5 | public bool HasSetter { get; set; } = true; 6 | 7 | // shortcut for the type of the first return value. 8 | // For a property that returns a tuple use Returns instead 9 | public string Type 10 | { 11 | get 12 | { 13 | if (Returns.Count == 0) 14 | return null; 15 | return Returns[0].Type; 16 | } 17 | set 18 | { 19 | if (Returns.Count == 0) 20 | Returns.Add(new Argument(){Type = value}); 21 | Returns[0].Type=value; 22 | } 23 | } 24 | 25 | public string DefaultValue { get; set; } 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/StaticApi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using CodeMinion.Core.Helpers; 5 | 6 | namespace CodeMinion.Core.Models 7 | { 8 | public class Api 9 | { 10 | /// 11 | /// API declarations 12 | /// 13 | public List Declarations { get; set; } = new List(); 14 | 15 | /// 16 | /// Target directory for the generated files 17 | /// 18 | public string OutputPath { get; set; } 19 | 20 | /// 21 | /// Additional name of a partial API file (required for splitting the API into multiple partial class files) 22 | /// 23 | public string PartialName { get; set; } 24 | 25 | public string SubDir { get; set; } 26 | 27 | } 28 | 29 | /// 30 | /// Represents a static API class that should be generated 31 | /// 32 | public class StaticApi : Api 33 | { 34 | /// 35 | /// Static name is the name of a static class that forwards to a singleton instance of the API implementation 36 | /// 37 | public string StaticName { get; set; } = "torch"; 38 | 39 | /// 40 | /// The static class forwards to this Singleton instance which is the API implementation 41 | /// 42 | public string ImplName { get; set; } = "PyTorch"; 43 | 44 | /// 45 | /// The python module this API represents 46 | /// 47 | public string PythonModule { get; set; } = "torch"; 48 | 49 | 50 | /// 51 | /// These are generated into the constructor of the API implementation object 52 | /// 53 | public List> InitializationGenerators { get; set; } = new List>(); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/TestCase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CodeMinion.Core.Models 6 | { 7 | public class TestCase 8 | { 9 | /// 10 | /// Name of the test function, if Null the test cases are numbered through 11 | /// 12 | public string Name { get; set; } 13 | 14 | public List TestParts { get; set; } = new List(); 15 | 16 | } 17 | 18 | public class TestPart { } 19 | 20 | public class Comment : TestPart 21 | { 22 | public string Text { get; set; } 23 | } 24 | public class ExampleCode : TestPart 25 | { 26 | public string Text { get; set; } 27 | public List Lines = new List(); 28 | } 29 | 30 | public class CodeLine 31 | { 32 | public string Type { get; set; } 33 | public List Text { get; set; }= new List(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/CodeMinion.Core/Models/TestFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CodeMinion.Core.Models 6 | { 7 | public class TestFile 8 | { 9 | /// 10 | /// Name of the test file without extension 11 | /// 12 | public string Name { get; set; } 13 | 14 | /// 15 | /// The tests in that test file 16 | /// 17 | public List TestCases { get; set; } = new List(); 18 | 19 | public string SubDir { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/CodeMinion.DocsParser/CodeMinion.Parser.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/CodeMinion.DocsParser/DocumentExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using HtmlAgilityPack; 6 | 7 | namespace CodeMinion.Parser 8 | { 9 | public static class HtmlNodeExtensions 10 | { 11 | public static IEnumerable DescendantsOfClass(this HtmlNode self, string tag, string @class) 12 | { 13 | return self.Descendants(tag).Where(x => x.Attributes["class"]?.Value == @class); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/CodeMinion.DocsParser/HtmlDoc.cs: -------------------------------------------------------------------------------- 1 | using HtmlAgilityPack; 2 | 3 | namespace CodeMinion.Parser 4 | { 5 | public class HtmlDoc 6 | { 7 | public string Filename { get; set; } 8 | //public string Url { get; set; } 9 | public string Text { get; set; } 10 | public HtmlDocument Doc { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/CodeMinion.DocsParser/HtmlDocuParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CodeMinion.DocsParser 4 | { 5 | public class HtmlDocuParser 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/CodeMinion.DocsParser/RegexExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace CodeMinion 7 | { 8 | public static class RegexExtensions 9 | { 10 | /// 11 | /// Returns the first explicit group or null if no match 12 | /// 13 | /// For example: if the regex is "ab(cd)ef" it will return cd 14 | /// if the regex is "ab(cd(ef))" it will return cdef 15 | /// 16 | /// 17 | /// 18 | public static string FirstGroupOrNull(this Match self) 19 | { 20 | if (!self.Success || self.Groups.Count < 2) 21 | return null; 22 | return self.Groups[1].Value; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MxNet/Context.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet 6 | { 7 | public class Context : Base 8 | { 9 | public static Context Default = new Context(DeviceType.CPU, 0); 10 | 11 | public Context(DeviceType device_type, int device_id = 0) 12 | { 13 | __self__ = Instance.mxnet.Context; 14 | Parameters["device_type"] = (int)device_type; 15 | Parameters["device_id"] = device_id; 16 | Init(); 17 | } 18 | 19 | public DeviceType device_type 20 | { 21 | get 22 | { 23 | return __self__.GetAttr("device_type").As(); 24 | } 25 | } 26 | 27 | public override string ToString() 28 | { 29 | return __self__.GetAttr("__str__").ToString(); 30 | } 31 | } 32 | 33 | public enum DeviceType 34 | { 35 | CPU = 1, 36 | GPU = 2, 37 | CPUPinned = 3, 38 | CPUShared = 5 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/MxNet/DType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet 6 | { 7 | public class DType 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/MxNet/Helper/DictSolver.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.Helper 7 | { 8 | public class DictSolver 9 | { 10 | public static Dictionary ToStrNDArray(PyDict dict) 11 | { 12 | Dictionary result = new Dictionary(); 13 | string[] keys = dict.Keys().As(); 14 | foreach (var item in keys) 15 | { 16 | result.Add(item, new NDArray(dict[item])); 17 | } 18 | 19 | return result; 20 | } 21 | 22 | public static Dictionary ToStrShape(PyDict dict) 23 | { 24 | Dictionary result = new Dictionary(); 25 | string[] keys = dict.Keys().As(); 26 | foreach (var item in keys) 27 | { 28 | result.Add(item, new Shape(dict[item])); 29 | } 30 | 31 | return result; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/MxNet/IPyClass.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ******************************************************************************/ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Text; 20 | 21 | namespace MxNet 22 | { 23 | public interface IPyClass 24 | { 25 | /// 26 | /// Called when the instance is created. 27 | /// 28 | /// 29 | void __init__(IPyClass self, dynamic args); 30 | 31 | void __enter__(IPyClass self); 32 | 33 | void __exit__(IPyClass self); 34 | 35 | void __del__(IPyClass self); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/MxNet/Initializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet 6 | { 7 | public class Initializer 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/MxNet/MxNet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/MxNet/ND/CachedOp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.ND 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class CachedOp : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.ndarray.CachedOp; 14 | public CachedOp() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/ND/NDArrayBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.ND 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class NDArrayBase : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.ndarray.NDArrayBase; 14 | public NDArrayBase() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/NDArray.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet 7 | { 8 | public class NDArray : PythonObject 9 | { 10 | public NDArray(PyObject py) : base(py) 11 | { 12 | 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/MxNet/PythonObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Python.Runtime; 5 | 6 | namespace MxNet 7 | { 8 | public partial class PythonObject : IDisposable 9 | { 10 | protected readonly PyObject self; 11 | public dynamic PyObject => self; 12 | 13 | public IntPtr Handle => self.Handle; 14 | 15 | public PythonObject(PyObject pyobject) 16 | { 17 | this.self = pyobject; 18 | } 19 | 20 | public PythonObject(PythonObject t) 21 | { 22 | this.self = t.PyObject; 23 | } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | if (obj == null) 28 | return false; 29 | switch (obj) 30 | { 31 | case PythonObject other: 32 | return self.Equals(other.self); 33 | case PyObject other: 34 | return self.Equals(other); 35 | } 36 | return base.Equals(obj); 37 | } 38 | 39 | public override int GetHashCode() 40 | { 41 | return self.GetHashCode(); 42 | } 43 | 44 | public override string ToString() 45 | { 46 | return self.ToString(); 47 | } 48 | 49 | public void Dispose() 50 | { 51 | self?.Dispose(); 52 | } 53 | 54 | public static PythonObject Create(string python_class) 55 | { 56 | throw new NotImplementedException(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/MxNet/Shape.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace MxNet 8 | { 9 | public class Shape : Base 10 | { 11 | public Shape(PyObject py) 12 | { 13 | __self__ = py; 14 | } 15 | 16 | public int[] Dimensions { get; } 17 | 18 | public Shape(params int[] shape) 19 | { 20 | this.Dimensions = shape; 21 | } 22 | 23 | public int this[int n] => Dimensions[n]; 24 | 25 | #region Equality 26 | 27 | public static bool operator ==(Shape a, Shape b) 28 | { 29 | if (b is null) return false; 30 | return Enumerable.SequenceEqual(a.Dimensions, b?.Dimensions); 31 | } 32 | 33 | public static bool operator !=(Shape a, Shape b) 34 | { 35 | return !(a == b); 36 | } 37 | 38 | public override bool Equals(object obj) 39 | { 40 | if (obj.GetType() != typeof(Shape)) 41 | return false; 42 | return Enumerable.SequenceEqual(Dimensions, ((Shape)obj).Dimensions); 43 | } 44 | 45 | public override int GetHashCode() 46 | { 47 | return (Dimensions ?? new int[0]).GetHashCode(); 48 | } 49 | 50 | public override string ToString() 51 | { 52 | return $"({string.Join(", ", Dimensions ?? new int[0])})"; 53 | } 54 | 55 | #endregion 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/MxNet/StringOrInitializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet 6 | { 7 | public class StringOrInitializer 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/MxNet/Symbol.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet 7 | { 8 | public class Symbol : PythonObject 9 | { 10 | public Symbol(PyObject py) : base(py) 11 | { 12 | 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/MxNet/autograd/Function.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet.autograd 6 | { 7 | public abstract class Function 8 | { 9 | public abstract NDArray Forward(NDArray x); 10 | 11 | public abstract NDArray Backward(NDArray dy); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/MxNet/callback/Callback.cs: -------------------------------------------------------------------------------- 1 | using MxNet.module; 2 | using Python.Runtime; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace MxNet.callback 8 | { 9 | public class Callback : Base 10 | { 11 | public Callback(PyObject py) 12 | { 13 | __self__ = py; 14 | } 15 | 16 | static dynamic caller = Instance.mxnet.callback; 17 | 18 | public static Callback module_checkpoint(BaseModule mod, string prefix, int period= 1, bool save_optimizer_states= false) 19 | { 20 | Dictionary parameters = new Dictionary(); 21 | parameters["mod"] = mod; 22 | parameters["prefix"] = prefix; 23 | parameters["period"] = period; 24 | parameters["save_optimizer_states"] = save_optimizer_states; 25 | 26 | return new Callback(InvokeStaticMethod(caller, "module_checkpoint", parameters)); 27 | } 28 | 29 | public static Callback do_checkpoint(string prefix, int period = 1) 30 | { 31 | Dictionary parameters = new Dictionary(); 32 | parameters["prefix"] = prefix; 33 | parameters["period"] = period; 34 | 35 | return new Callback(InvokeStaticMethod(caller, "do_checkpoint", parameters)); 36 | } 37 | 38 | public static Callback log_train_metric(int period , bool auto_reset = false) 39 | { 40 | Dictionary parameters = new Dictionary(); 41 | parameters["period"] = period; 42 | parameters["auto_reset"] = auto_reset; 43 | 44 | return new Callback(InvokeStaticMethod(caller, "log_train_metric", parameters)); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/MxNet/callback/LogValidationMetricsCallback.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet.callback 6 | { 7 | public class LogValidationMetricsCallback : Base 8 | { 9 | public LogValidationMetricsCallback() 10 | { 11 | __self__ = Instance.mxnet.callback.LogValidationMetricsCallback; 12 | Init(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/MxNet/callback/ProgressBar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet.callback 6 | { 7 | public class ProgressBar : Base 8 | { 9 | public ProgressBar(int total, int length = 80) 10 | { 11 | __self__ = Instance.mxnet.callback.ProgressBar; 12 | Parameters["total"] = total; 13 | Parameters["length"] = length; 14 | Init(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/MxNet/callback/Speedometer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet.callback 6 | { 7 | public class Speedometer : Base 8 | { 9 | public Speedometer(int batch_size, int frequent = 50, bool auto_reset = true) 10 | { 11 | __self__ = Instance.mxnet.callback.Speedometer; 12 | Parameters["batch_size"] = batch_size; 13 | Parameters["frequent"] = frequent; 14 | Parameters["auto_reset"] = auto_reset; 15 | Init(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/MxNet/collections/Counter.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.Collections 7 | { 8 | public class Counter : Base 9 | { 10 | public Counter(PyObject py) 11 | { 12 | __self__ = py; 13 | } 14 | 15 | public Counter(string[] iterable) 16 | { 17 | __self__ = Instance.collections.Counter(iterable); 18 | } 19 | 20 | public Counter(Dictionary mapping) 21 | { 22 | __self__ = Instance.collections.Counter(mapping); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MxNet/contrib/onnx/MX2Onnx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Python.Runtime; 5 | 6 | namespace MxNet.contrib.onnx 7 | { 8 | public class MX2Onnx : Base 9 | { 10 | static dynamic caller = Instance.mxnet.contrib.onnx.mx2onnx.export_model; 11 | 12 | public static string export_model(Symbol sym, Symbol @params, Shape input_shape, DType input_type = null, 13 | string onnx_file_path = "model.onnx", bool verbose = false) 14 | { 15 | Dictionary parameters = new Dictionary(); 16 | parameters["sym"] = sym; 17 | parameters["params"] = @params; 18 | parameters["input_shape"] = input_shape; 19 | parameters["input_type"] = input_type; 20 | parameters["onnx_file_path"] = onnx_file_path; 21 | parameters["verbose"] = verbose; 22 | 23 | return InvokeStaticMethod(caller, "get_vecs_by_tokens", parameters).ToString(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/MxNet/contrib/onnx/Onnx2Mx.cs: -------------------------------------------------------------------------------- 1 | using MxNet.gluon; 2 | using MxNet.Helper; 3 | using Python.Runtime; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | 8 | namespace MxNet.contrib.onnx 9 | { 10 | public class Onnx2MX : Base 11 | { 12 | static dynamic caller = Instance.mxnet.contrib.onnx.onnx2mx; 13 | 14 | public static (Symbol, Dictionary, Dictionary) import_model(string model_file) 15 | { 16 | Dictionary parameters = new Dictionary(); 17 | parameters["model_file"] = model_file; 18 | 19 | PyObject py = InvokeStaticMethod(caller.import_model, "import_model", parameters); 20 | PyTuple tuple = new PyTuple(py); 21 | Symbol sym = new Symbol(tuple[0]); 22 | 23 | PyDict argParams = new PyDict(tuple[1]); 24 | PyDict auxParams = new PyDict(tuple[2]); 25 | 26 | return (sym, DictSolver.ToStrNDArray(argParams), DictSolver.ToStrNDArray(auxParams)); 27 | } 28 | 29 | public static Dictionary get_model_metadata(string model_file) 30 | { 31 | Dictionary parameters = new Dictionary(); 32 | parameters["model_file"] = model_file; 33 | 34 | PyObject py = InvokeStaticMethod(caller.import_model, "import_model", parameters); 35 | PyDict dict = new PyDict(py); 36 | 37 | return DictSolver.ToStrShape(dict); 38 | } 39 | 40 | public static SymbolBlock import_to_gluon(string model_file, Context ctx) 41 | { 42 | Dictionary parameters = new Dictionary(); 43 | parameters["model_file"] = model_file; 44 | parameters["ctx"] = ctx; 45 | 46 | PyObject py = InvokeStaticMethod(caller.import_to_gluonr, "import_model", parameters); 47 | 48 | return new SymbolBlock(py); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/MxNet/contrib/text/CompositeEmbedding.cs: -------------------------------------------------------------------------------- 1 | using MxNet.callback; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.contrib.text 7 | { 8 | public class CompositeEmbedding : Base 9 | { 10 | public CompositeEmbedding(Vocabulary vocabulary, Embedding token_embeddings) 11 | { 12 | __self__ = Instance.mxnet.contrib.text.embedding.CompositeEmbedding; 13 | Parameters["vocabulary"] = vocabulary; 14 | Parameters["token_embeddings"] = token_embeddings; 15 | Init(); 16 | } 17 | 18 | public NDArray get_vecs_by_tokens(string[] tokens, bool lower_case_backup = false) 19 | { 20 | Dictionary parameters = new Dictionary(); 21 | parameters["tokens"] = tokens; 22 | parameters["lower_case_backup"] = lower_case_backup; 23 | 24 | return new NDArray(InvokeMethod("get_vecs_by_tokens", parameters)); 25 | } 26 | 27 | public int[] to_indices(string[] tokens) 28 | { 29 | Dictionary parameters = new Dictionary(); 30 | parameters["tokens"] = tokens; 31 | 32 | return InvokeMethod("to_indices", parameters).As(); 33 | } 34 | 35 | public string[] to_tokens(string[] tokens) 36 | { 37 | Dictionary parameters = new Dictionary(); 38 | parameters["tokens"] = tokens; 39 | 40 | return InvokeMethod("to_indices", parameters).As(); 41 | } 42 | 43 | public void update_token_vectors(string[] tokens, NDArray new_vectors) 44 | { 45 | Dictionary parameters = new Dictionary(); 46 | parameters["tokens"] = tokens; 47 | parameters["new_vectors"] = new_vectors; 48 | 49 | InvokeMethod("update_token_vectors", parameters).As(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/MxNet/contrib/text/Embedding.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.contrib.text 7 | { 8 | public class Embedding : Base 9 | { 10 | static dynamic caller = Instance.mxnet.contrib.text.embedding; 11 | 12 | public Embedding(PyObject py) 13 | { 14 | __self__ = py; 15 | } 16 | 17 | public static Embedding register(Embedding embedding_cls) 18 | { 19 | Dictionary parameters = new Dictionary(); 20 | parameters["embedding_cls"] = embedding_cls; 21 | 22 | return new Embedding(InvokeStaticMethod(caller, "register", parameters)); 23 | } 24 | 25 | public static Embedding create(string embedding_name) 26 | { 27 | Dictionary parameters = new Dictionary(); 28 | parameters["embedding_name"] = embedding_name; 29 | 30 | return new Embedding(InvokeStaticMethod(caller, "create", parameters)); 31 | } 32 | 33 | public static string[] get_pretrained_file_names(string embedding_name) 34 | { 35 | Dictionary parameters = new Dictionary(); 36 | parameters["embedding_name"] = embedding_name; 37 | 38 | return ((PyObject)InvokeStaticMethod(caller, "get_pretrained_file_names", parameters)).As(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/MxNet/contrib/text/Utils.cs: -------------------------------------------------------------------------------- 1 | using MxNet.Collections; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.contrib.text 7 | { 8 | public class Utils : Base 9 | { 10 | static dynamic caller = Instance.mxnet.contrib.utils; 11 | 12 | public static Counter count_tokens_from_str(string source_str, string token_delim= " ", string seq_delim= "\n", bool to_lower= false, Counter counter_to_update= null) 13 | { 14 | 15 | Dictionary parameters = new Dictionary(); 16 | parameters["source_str"] = source_str; 17 | parameters["token_delim"] = token_delim; 18 | parameters["seq_delim"] = seq_delim; 19 | parameters["to_lower"] = to_lower; 20 | parameters["counter_to_update"] = counter_to_update; 21 | 22 | return new Counter(InvokeStaticMethod(caller, "get_vecs_by_tokens", parameters)); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MxNet/contrib/text/Vocabulary.cs: -------------------------------------------------------------------------------- 1 | using MxNet.Collections; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.contrib.text 7 | { 8 | public class Vocabulary : Base 9 | { 10 | public Vocabulary(Counter counter = null, int? most_freq_count = null, int min_freq = 1, string unknown_token = "", string[] reserved_tokens = null) 11 | { 12 | __self__ = Instance.mxnet.contrib.text.embedding.FastText; 13 | Parameters["counter"] = counter; 14 | Parameters["most_freq_count"] = most_freq_count; 15 | Parameters["min_freq"] = min_freq; 16 | Parameters["unknown_token"] = unknown_token; 17 | Parameters["reserved_tokens"] = reserved_tokens; 18 | Init(); 19 | } 20 | 21 | public int[] to_indices(string[] tokens) 22 | { 23 | Dictionary parameters = new Dictionary(); 24 | parameters["tokens"] = tokens; 25 | 26 | return InvokeMethod("to_indices", parameters).As(); 27 | } 28 | 29 | public string[] to_tokens(string[] tokens) 30 | { 31 | Dictionary parameters = new Dictionary(); 32 | parameters["tokens"] = tokens; 33 | 34 | return InvokeMethod("to_indices", parameters).As(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Activation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Activation : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Activation; 14 | public Activation(string activation) 15 | { 16 | Parameters["activation"] = activation; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/AvgPool1D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class AvgPool1D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.AvgPool1D; 14 | public AvgPool1D(int pool_size,int strides,int padding,string layout,bool ceil_mode,bool count_include_pad) 15 | { 16 | Parameters["pool_size"] = pool_size; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["layout"] = layout; 20 | Parameters["ceil_mode"] = ceil_mode; 21 | Parameters["count_include_pad"] = count_include_pad; 22 | 23 | __self__ = caller; 24 | } 25 | 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/AvgPool2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class AvgPool2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.AvgPool2D; 14 | public AvgPool2D(int[] pool_size,int strides,int[] padding,string layout,bool ceil_mode,bool count_include_pad) 15 | { 16 | Parameters["pool_size"] = pool_size; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["layout"] = layout; 20 | Parameters["ceil_mode"] = ceil_mode; 21 | Parameters["count_include_pad"] = count_include_pad; 22 | 23 | __self__ = caller; 24 | } 25 | 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/AvgPool3D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class AvgPool3D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.AvgPool3D; 14 | public AvgPool3D(int[] pool_size,int strides,int[] padding,string layout,bool ceil_mode,bool count_include_pad) 15 | { 16 | Parameters["pool_size"] = pool_size; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["layout"] = layout; 20 | Parameters["ceil_mode"] = ceil_mode; 21 | Parameters["count_include_pad"] = count_include_pad; 22 | 23 | __self__ = caller; 24 | } 25 | 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/BatchNorm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BatchNorm : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.BatchNorm; 14 | public BatchNorm(int axis,int in_channels) 15 | { 16 | Parameters["axis"] = axis; 17 | Parameters["in_channels"] = in_channels; 18 | 19 | __self__ = caller; 20 | } 21 | 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Block.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Block : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Block; 14 | public Block() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Conv1D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Conv1D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Conv1D; 14 | public Conv1D(int channels,int[] strides,int[] padding,int[] dilation,int groups,int in_channels,string activation,bool use_bias,StringOrInitializer weight_initializer = null,StringOrInitializer bias_initializer = null) 15 | { 16 | Parameters["channels"] = channels; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["dilation"] = dilation; 20 | Parameters["groups"] = groups; 21 | Parameters["in_channels"] = in_channels; 22 | Parameters["activation"] = activation; 23 | Parameters["use_bias"] = use_bias; 24 | Parameters["weight_initializer"] = weight_initializer; 25 | Parameters["bias_initializer"] = bias_initializer; 26 | 27 | __self__ = caller; 28 | } 29 | 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Conv1DTranspose.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Conv1DTranspose : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Conv1DTranspose; 14 | public Conv1DTranspose(int channels,int[] strides,int[] padding,int[] dilation,int groups,string layout,int in_channels,string activation,bool use_bias,StringOrInitializer weight_initializer = null,StringOrInitializer bias_initializer = null) 15 | { 16 | Parameters["channels"] = channels; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["dilation"] = dilation; 20 | Parameters["groups"] = groups; 21 | Parameters["layout"] = layout; 22 | Parameters["in_channels"] = in_channels; 23 | Parameters["activation"] = activation; 24 | Parameters["use_bias"] = use_bias; 25 | Parameters["weight_initializer"] = weight_initializer; 26 | Parameters["bias_initializer"] = bias_initializer; 27 | 28 | __self__ = caller; 29 | } 30 | 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Conv2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Conv2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Conv2D; 14 | public Conv2D(int channels,int[] strides,int[] padding,int[] dilation,int groups,string layout,int in_channels,string activation,bool use_bias,StringOrInitializer weight_initializer = null,StringOrInitializer bias_initializer = null) 15 | { 16 | Parameters["channels"] = channels; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["dilation"] = dilation; 20 | Parameters["groups"] = groups; 21 | Parameters["layout"] = layout; 22 | Parameters["in_channels"] = in_channels; 23 | Parameters["activation"] = activation; 24 | Parameters["use_bias"] = use_bias; 25 | Parameters["weight_initializer"] = weight_initializer; 26 | Parameters["bias_initializer"] = bias_initializer; 27 | 28 | __self__ = caller; 29 | } 30 | 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Conv2DTranspose.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Conv2DTranspose : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Conv2DTranspose; 14 | public Conv2DTranspose(int channels,int[] strides,int[] padding,int[] dilation,int groups,string layout,int in_channels,string activation,bool use_bias,StringOrInitializer weight_initializer = null,StringOrInitializer bias_initializer = null) 15 | { 16 | Parameters["channels"] = channels; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["dilation"] = dilation; 20 | Parameters["groups"] = groups; 21 | Parameters["layout"] = layout; 22 | Parameters["in_channels"] = in_channels; 23 | Parameters["activation"] = activation; 24 | Parameters["use_bias"] = use_bias; 25 | Parameters["weight_initializer"] = weight_initializer; 26 | Parameters["bias_initializer"] = bias_initializer; 27 | 28 | __self__ = caller; 29 | } 30 | 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Conv3D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Conv3D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Conv3D; 14 | public Conv3D(int channels,int[] strides,int[] padding,int[] dilation,int groups,string layout,int in_channels,string activation,bool use_bias,StringOrInitializer weight_initializer = null,StringOrInitializer bias_initializer = null) 15 | { 16 | Parameters["channels"] = channels; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["dilation"] = dilation; 20 | Parameters["groups"] = groups; 21 | Parameters["layout"] = layout; 22 | Parameters["in_channels"] = in_channels; 23 | Parameters["activation"] = activation; 24 | Parameters["use_bias"] = use_bias; 25 | Parameters["weight_initializer"] = weight_initializer; 26 | Parameters["bias_initializer"] = bias_initializer; 27 | 28 | __self__ = caller; 29 | } 30 | 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Conv3DTranspose.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Conv3DTranspose : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Conv3DTranspose; 14 | public Conv3DTranspose(int channels,int[] strides,int[] padding,int[] dilation,int groups,string layout,int in_channels,string activation,bool use_bias,StringOrInitializer weight_initializer = null,StringOrInitializer bias_initializer = null) 15 | { 16 | Parameters["channels"] = channels; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["dilation"] = dilation; 20 | Parameters["groups"] = groups; 21 | Parameters["layout"] = layout; 22 | Parameters["in_channels"] = in_channels; 23 | Parameters["activation"] = activation; 24 | Parameters["use_bias"] = use_bias; 25 | Parameters["weight_initializer"] = weight_initializer; 26 | Parameters["bias_initializer"] = bias_initializer; 27 | 28 | __self__ = caller; 29 | } 30 | 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Dense.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Dense : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Dense; 14 | public Dense(int units, string activation, bool use_bias, DType dtype = null, StringOrInitializer weight_initializer = null, int in_units = 0) 15 | { 16 | Parameters["units"] = units; 17 | Parameters["activation"] = activation; 18 | Parameters["use_bias"] = use_bias; 19 | Parameters["dtype"] = dtype; 20 | Parameters["weight_initializer"] = weight_initializer; 21 | Parameters["in_units"] = in_units; 22 | 23 | __self__ = caller; 24 | } 25 | 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Dropout.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Dropout : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Dropout; 14 | public Dropout(float rate,int[] axes) 15 | { 16 | Parameters["rate"] = rate; 17 | Parameters["axes"] = axes; 18 | 19 | __self__ = caller; 20 | } 21 | 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/ELU.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ELU : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.ELU; 14 | public ELU(float alpha) 15 | { 16 | Parameters["alpha"] = alpha; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Embedding.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Embedding : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Embedding; 14 | public Embedding(int input_dim,int output_dim,DType dtype = null,Initializer weight_initializer = null) 15 | { 16 | Parameters["input_dim"] = input_dim; 17 | Parameters["output_dim"] = output_dim; 18 | Parameters["dtype"] = dtype; 19 | Parameters["weight_initializer"] = weight_initializer; 20 | 21 | __self__ = caller; 22 | } 23 | 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Flatten.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Flatten : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Flatten; 14 | public Flatten() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/GlobalAvgPool1D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GlobalAvgPool1D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.GlobalAvgPool1D; 14 | public GlobalAvgPool1D(string layout) 15 | { 16 | Parameters["layout"] = layout; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/GlobalAvgPool2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GlobalAvgPool2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.GlobalAvgPool2D; 14 | public GlobalAvgPool2D(string layout) 15 | { 16 | Parameters["layout"] = layout; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/GlobalAvgPool3D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GlobalAvgPool3D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.GlobalAvgPool3D; 14 | public GlobalAvgPool3D(string layout) 15 | { 16 | Parameters["layout"] = layout; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/GlobalMaxPool1D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GlobalMaxPool1D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.GlobalMaxPool1D; 14 | public GlobalMaxPool1D(string layout) 15 | { 16 | Parameters["layout"] = layout; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/GlobalMaxPool2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GlobalMaxPool2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.GlobalMaxPool2D; 14 | public GlobalMaxPool2D(string layout) 15 | { 16 | Parameters["layout"] = layout; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/GlobalMaxPool3D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GlobalMaxPool3D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.GlobalMaxPool3D; 14 | public GlobalMaxPool3D(string layout) 15 | { 16 | Parameters["layout"] = layout; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/HybridBlock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class HybridBlock : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.HybridBlock; 14 | public HybridBlock() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/HybridLambda.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class HybridLambda : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.HybridLambda; 14 | public HybridLambda(object function) 15 | { 16 | Parameters["function"] = function; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/HybridSequential.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class HybridSequential : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.HybridSequential; 14 | public HybridSequential() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/InstanceNorm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class InstanceNorm : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.InstanceNorm; 14 | public InstanceNorm(int axis,int in_channels) 15 | { 16 | Parameters["axis"] = axis; 17 | Parameters["in_channels"] = in_channels; 18 | 19 | __self__ = caller; 20 | } 21 | 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Lambda.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Lambda : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Lambda; 14 | public Lambda(object function) 15 | { 16 | Parameters["function"] = function; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/LayerNorm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class LayerNorm : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.LayerNorm; 14 | public LayerNorm(int axis,int in_channels) 15 | { 16 | Parameters["axis"] = axis; 17 | Parameters["in_channels"] = in_channels; 18 | 19 | __self__ = caller; 20 | } 21 | 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/LeakyReLU.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class LeakyReLU : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.LeakyReLU; 14 | public LeakyReLU(float alpha) 15 | { 16 | Parameters["alpha"] = alpha; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/MaxPool1D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MaxPool1D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.MaxPool1D; 14 | public MaxPool1D(int pool_size,int strides,int padding,string layout,bool ceil_mode) 15 | { 16 | Parameters["pool_size"] = pool_size; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["layout"] = layout; 20 | Parameters["ceil_mode"] = ceil_mode; 21 | 22 | __self__ = caller; 23 | } 24 | 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/MaxPool2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MaxPool2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.MaxPool2D; 14 | public MaxPool2D(int[] pool_size,int strides,int[] padding,string layout,bool ceil_mode) 15 | { 16 | Parameters["pool_size"] = pool_size; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["layout"] = layout; 20 | Parameters["ceil_mode"] = ceil_mode; 21 | 22 | __self__ = caller; 23 | } 24 | 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/MaxPool3D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MaxPool3D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.MaxPool3D; 14 | public MaxPool3D(int[] pool_size,int strides,int[] padding,string layout,bool ceil_mode) 15 | { 16 | Parameters["pool_size"] = pool_size; 17 | Parameters["strides"] = strides; 18 | Parameters["padding"] = padding; 19 | Parameters["layout"] = layout; 20 | Parameters["ceil_mode"] = ceil_mode; 21 | 22 | __self__ = caller; 23 | } 24 | 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/PReLU.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class PReLU : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.PReLU; 14 | public PReLU(Initializer alpha_initializer = null) 15 | { 16 | Parameters["alpha_initializer"] = alpha_initializer; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/ReflectionPad2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ReflectionPad2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.ReflectionPad2D; 14 | public ReflectionPad2D(int padding) 15 | { 16 | Parameters["padding"] = padding; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/SELU.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class SELU : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.SELU; 14 | public SELU() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Sequential.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Sequential : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Sequential; 14 | public Sequential() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/NN/Swish.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.Gluon.NN 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Swish : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.gluon.nn.Swish; 14 | public Swish(float beta) 15 | { 16 | Parameters["beta"] = beta; 17 | 18 | __self__ = caller; 19 | } 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/MxNet/gluon/SymbolBlock.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.gluon 7 | { 8 | public class SymbolBlock : Base 9 | { 10 | public SymbolBlock(PyObject py) 11 | { 12 | __self__ = py; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/MxNet/image/AKAZE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class AKAZE : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.AKAZE; 14 | public AKAZE() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/AgastFeatureDetector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class AgastFeatureDetector : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.AgastFeatureDetector; 14 | public AgastFeatureDetector() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/Algorithm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Algorithm : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.Algorithm; 14 | public Algorithm() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/AlignExposures.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class AlignExposures : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.AlignExposures; 14 | public AlignExposures() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/AlignMTB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class AlignMTB : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.AlignMTB; 14 | public AlignMTB() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BFMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BFMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BFMatcher; 14 | public BFMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BOWImgDescriptorExtractor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BOWImgDescriptorExtractor : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BOWImgDescriptorExtractor; 14 | public BOWImgDescriptorExtractor() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BOWKMeansTrainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BOWKMeansTrainer : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BOWKMeansTrainer; 14 | public BOWKMeansTrainer() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BOWTrainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BOWTrainer : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BOWTrainer; 14 | public BOWTrainer() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BRISK.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BRISK : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BRISK; 14 | public BRISK() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BackgroundSubtractor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BackgroundSubtractor : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BackgroundSubtractor; 14 | public BackgroundSubtractor() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BackgroundSubtractorKNN.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BackgroundSubtractorKNN : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BackgroundSubtractorKNN; 14 | public BackgroundSubtractorKNN() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BackgroundSubtractorMOG2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BackgroundSubtractorMOG2 : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BackgroundSubtractorMOG2; 14 | public BackgroundSubtractorMOG2() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/BaseCascadeClassifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class BaseCascadeClassifier : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.BaseCascadeClassifier; 14 | public BaseCascadeClassifier() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/CLAHE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class CLAHE : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.CLAHE; 14 | public CLAHE() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/CalibrateCRF.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class CalibrateCRF : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.CalibrateCRF; 14 | public CalibrateCRF() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/CalibrateDebevec.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class CalibrateDebevec : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.CalibrateDebevec; 14 | public CalibrateDebevec() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/CalibrateRobertson.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class CalibrateRobertson : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.CalibrateRobertson; 14 | public CalibrateRobertson() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/CascadeClassifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class CascadeClassifier : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.CascadeClassifier; 14 | public CascadeClassifier() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/CirclesGridFinderParameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class CirclesGridFinderParameters : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.CirclesGridFinderParameters; 14 | public CirclesGridFinderParameters() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/DISOpticalFlow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class DISOpticalFlow : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.DISOpticalFlow; 14 | public DISOpticalFlow() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/DMatch.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class DMatch : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.DMatch; 14 | public DMatch() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/DenseOpticalFlow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class DenseOpticalFlow : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.DenseOpticalFlow; 14 | public DenseOpticalFlow() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/DescriptorMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class DescriptorMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.DescriptorMatcher; 14 | public DescriptorMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/FarnebackOpticalFlow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class FarnebackOpticalFlow : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.FarnebackOpticalFlow; 14 | public FarnebackOpticalFlow() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/FastFeatureDetector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class FastFeatureDetector : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.FastFeatureDetector; 14 | public FastFeatureDetector() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/Feature2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Feature2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.Feature2D; 14 | public Feature2D() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/FileNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class FileNode : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.FileNode; 14 | public FileNode() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/FileStorage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class FileStorage : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.FileStorage; 14 | public FileStorage() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/FlannBasedMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class FlannBasedMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.FlannBasedMatcher; 14 | public FlannBasedMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/GFTTDetector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GFTTDetector : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.GFTTDetector; 14 | public GFTTDetector() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/GeneralizedHough.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GeneralizedHough : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.GeneralizedHough; 14 | public GeneralizedHough() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/GeneralizedHoughBallard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GeneralizedHoughBallard : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.GeneralizedHoughBallard; 14 | public GeneralizedHoughBallard() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/GeneralizedHoughGuil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class GeneralizedHoughGuil : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.GeneralizedHoughGuil; 14 | public GeneralizedHoughGuil() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/HOGDescriptor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class HOGDescriptor : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.HOGDescriptor; 14 | public HOGDescriptor() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/KAZE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class KAZE : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.KAZE; 14 | public KAZE() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/KalmanFilter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class KalmanFilter : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.KalmanFilter; 14 | public KalmanFilter() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/KeyPoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class KeyPoint : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.KeyPoint; 14 | public KeyPoint() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/LineSegmentDetector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class LineSegmentDetector : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.LineSegmentDetector; 14 | public LineSegmentDetector() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/MSER.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MSER : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.MSER; 14 | public MSER() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/MergeDebevec.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MergeDebevec : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.MergeDebevec; 14 | public MergeDebevec() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/MergeExposures.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MergeExposures : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.MergeExposures; 14 | public MergeExposures() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/MergeMertens.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MergeMertens : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.MergeMertens; 14 | public MergeMertens() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/MergeRobertson.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class MergeRobertson : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.MergeRobertson; 14 | public MergeRobertson() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ORB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ORB : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ORB; 14 | public ORB() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/PyRotationWarper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class PyRotationWarper : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.PyRotationWarper; 14 | public PyRotationWarper() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/QRCodeDetector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class QRCodeDetector : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.QRCodeDetector; 14 | public QRCodeDetector() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/SimpleBlobDetector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class SimpleBlobDetector : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.SimpleBlobDetector; 14 | public SimpleBlobDetector() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/SimpleBlobDetector_Params.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class SimpleBlobDetector_Params : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.SimpleBlobDetector_Params; 14 | public SimpleBlobDetector_Params() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/SparseOpticalFlow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class SparseOpticalFlow : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.SparseOpticalFlow; 14 | public SparseOpticalFlow() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/SparsePyrLKOpticalFlow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class SparsePyrLKOpticalFlow : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.SparsePyrLKOpticalFlow; 14 | public SparsePyrLKOpticalFlow() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/StereoBM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class StereoBM : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.StereoBM; 14 | public StereoBM() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/StereoMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class StereoMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.StereoMatcher; 14 | public StereoMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/StereoSGBM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class StereoSGBM : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.StereoSGBM; 14 | public StereoSGBM() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/Stitcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Stitcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.Stitcher; 14 | public Stitcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/Subdiv2D.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Subdiv2D : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.Subdiv2D; 14 | public Subdiv2D() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/TickMeter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class TickMeter : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.TickMeter; 14 | public TickMeter() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/Tonemap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class Tonemap : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.Tonemap; 14 | public Tonemap() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/TonemapDrago.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class TonemapDrago : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.TonemapDrago; 14 | public TonemapDrago() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/TonemapMantiuk.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class TonemapMantiuk : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.TonemapMantiuk; 14 | public TonemapMantiuk() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/TonemapReinhard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class TonemapReinhard : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.TonemapReinhard; 14 | public TonemapReinhard() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/UMat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class UMat : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.UMat; 14 | public UMat() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/VariationalRefinement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class VariationalRefinement : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.VariationalRefinement; 14 | public VariationalRefinement() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/VideoCapture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class VideoCapture : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.VideoCapture; 14 | public VideoCapture() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/VideoWriter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class VideoWriter : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.VideoWriter; 14 | public VideoWriter() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/WarperCreator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class WarperCreator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.WarperCreator; 14 | public WarperCreator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_BufferPool.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_BufferPool : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_BufferPool; 14 | public cuda_BufferPool() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_DeviceInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_DeviceInfo : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_DeviceInfo; 14 | public cuda_DeviceInfo() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_Event.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_Event : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_Event; 14 | public cuda_Event() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_GpuMat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_GpuMat : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_GpuMat; 14 | public cuda_GpuMat() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_GpuMat_Allocator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_GpuMat_Allocator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_GpuMat_Allocator; 14 | public cuda_GpuMat_Allocator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_HostMem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_HostMem : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_HostMem; 14 | public cuda_HostMem() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_Stream.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_Stream : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_Stream; 14 | public cuda_Stream() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/cuda_TargetArchs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class cuda_TargetArchs : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.cuda_TargetArchs; 14 | public cuda_TargetArchs() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_AffineBasedEstimator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_AffineBasedEstimator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_AffineBasedEstimator; 14 | public detail_AffineBasedEstimator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_AffineBestOf2NearestMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_AffineBestOf2NearestMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_AffineBestOf2NearestMatcher; 14 | public detail_AffineBestOf2NearestMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BestOf2NearestMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BestOf2NearestMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BestOf2NearestMatcher; 14 | public detail_BestOf2NearestMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BestOf2NearestRangeMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BestOf2NearestRangeMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BestOf2NearestRangeMatcher; 14 | public detail_BestOf2NearestRangeMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_Blender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_Blender : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_Blender; 14 | public detail_Blender() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BlocksChannelsCompensator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BlocksChannelsCompensator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BlocksChannelsCompensator; 14 | public detail_BlocksChannelsCompensator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BlocksCompensator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BlocksCompensator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BlocksCompensator; 14 | public detail_BlocksCompensator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BlocksGainCompensator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BlocksGainCompensator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BlocksGainCompensator; 14 | public detail_BlocksGainCompensator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BundleAdjusterAffine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BundleAdjusterAffine : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BundleAdjusterAffine; 14 | public detail_BundleAdjusterAffine() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BundleAdjusterAffinePartial.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BundleAdjusterAffinePartial : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BundleAdjusterAffinePartial; 14 | public detail_BundleAdjusterAffinePartial() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BundleAdjusterBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BundleAdjusterBase : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BundleAdjusterBase; 14 | public detail_BundleAdjusterBase() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BundleAdjusterRay.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BundleAdjusterRay : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BundleAdjusterRay; 14 | public detail_BundleAdjusterRay() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_BundleAdjusterReproj.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_BundleAdjusterReproj : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_BundleAdjusterReproj; 14 | public detail_BundleAdjusterReproj() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_CameraParams.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_CameraParams : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_CameraParams; 14 | public detail_CameraParams() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_ChannelsCompensator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_ChannelsCompensator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_ChannelsCompensator; 14 | public detail_ChannelsCompensator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_DpSeamFinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_DpSeamFinder : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_DpSeamFinder; 14 | public detail_DpSeamFinder() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_Estimator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_Estimator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_Estimator; 14 | public detail_Estimator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_ExposureCompensator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_ExposureCompensator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_ExposureCompensator; 14 | public detail_ExposureCompensator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_FeatherBlender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_FeatherBlender : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_FeatherBlender; 14 | public detail_FeatherBlender() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_FeaturesMatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_FeaturesMatcher : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_FeaturesMatcher; 14 | public detail_FeaturesMatcher() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_GainCompensator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_GainCompensator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_GainCompensator; 14 | public detail_GainCompensator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_GraphCutSeamFinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_GraphCutSeamFinder : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_GraphCutSeamFinder; 14 | public detail_GraphCutSeamFinder() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_HomographyBasedEstimator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_HomographyBasedEstimator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_HomographyBasedEstimator; 14 | public detail_HomographyBasedEstimator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_ImageFeatures.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_ImageFeatures : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_ImageFeatures; 14 | public detail_ImageFeatures() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_MatchesInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_MatchesInfo : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_MatchesInfo; 14 | public detail_MatchesInfo() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_MultiBandBlender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_MultiBandBlender : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_MultiBandBlender; 14 | public detail_MultiBandBlender() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_NoBundleAdjuster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_NoBundleAdjuster : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_NoBundleAdjuster; 14 | public detail_NoBundleAdjuster() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_NoExposureCompensator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_NoExposureCompensator : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_NoExposureCompensator; 14 | public detail_NoExposureCompensator() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_NoSeamFinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_NoSeamFinder : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_NoSeamFinder; 14 | public detail_NoSeamFinder() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_PairwiseSeamFinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_PairwiseSeamFinder : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_PairwiseSeamFinder; 14 | public detail_PairwiseSeamFinder() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_ProjectorBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_ProjectorBase : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_ProjectorBase; 14 | public detail_ProjectorBase() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_SeamFinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_SeamFinder : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_SeamFinder; 14 | public detail_SeamFinder() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_SphericalProjector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_SphericalProjector : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_SphericalProjector; 14 | public detail_SphericalProjector() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_Timelapser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_Timelapser : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_Timelapser; 14 | public detail_Timelapser() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_TimelapserCrop.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_TimelapserCrop : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_TimelapserCrop; 14 | public detail_TimelapserCrop() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/detail_VoronoiSeamFinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class detail_VoronoiSeamFinder : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.detail_VoronoiSeamFinder; 14 | public detail_VoronoiSeamFinder() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/dnn_DictValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class dnn_DictValue : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.dnn_DictValue; 14 | public dnn_DictValue() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/dnn_Layer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class dnn_Layer : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.dnn_Layer; 14 | public dnn_Layer() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/dnn_Net.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class dnn_Net : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.dnn_Net; 14 | public dnn_Net() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/error.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class error : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.error; 14 | public error() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/flann_Index.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class flann_Index : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.flann_Index; 14 | public flann_Index() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_ANN_MLP.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_ANN_MLP : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_ANN_MLP; 14 | public ml_ANN_MLP() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_Boost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_Boost : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_Boost; 14 | public ml_Boost() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_DTrees.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_DTrees : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_DTrees; 14 | public ml_DTrees() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_EM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_EM : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_EM; 14 | public ml_EM() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_KNearest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_KNearest : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_KNearest; 14 | public ml_KNearest() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_LogisticRegression.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_LogisticRegression : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_LogisticRegression; 14 | public ml_LogisticRegression() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_NormalBayesClassifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_NormalBayesClassifier : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_NormalBayesClassifier; 14 | public ml_NormalBayesClassifier() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_ParamGrid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_ParamGrid : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_ParamGrid; 14 | public ml_ParamGrid() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_RTrees.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_RTrees : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_RTrees; 14 | public ml_RTrees() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_SVM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_SVM : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_SVM; 14 | public ml_SVM() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_SVMSGD.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_SVMSGD : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_SVMSGD; 14 | public ml_SVMSGD() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_StatModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_StatModel : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_StatModel; 14 | public ml_StatModel() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ml_TrainData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ml_TrainData : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ml_TrainData; 14 | public ml_TrainData() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/image/ocl_Device.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace MxNet.image 7 | { 8 | /// 9 | /// [COMMENTS] 10 | /// 11 | public class ocl_Device : Base 12 | { 13 | private static dynamic caller = Instance.mxnet.cv2.ocl_Device; 14 | public ocl_Device() 15 | { 16 | 17 | __self__ = caller; 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/MxNet/logging/Logger.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.logging 7 | { 8 | public class Logger : Base 9 | { 10 | public Logger(PyObject py) 11 | { 12 | __self__ = py; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/MxNet/logging/Logging.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet.logging 6 | { 7 | public class Logging : Base 8 | { 9 | public Logging() 10 | { 11 | __self__ = Instance.logging; 12 | Init(); 13 | } 14 | 15 | public const int CRITICAL = 50; 16 | public const int FATAL = 50; 17 | public const int ERROR = 40; 18 | public const int WARNING = 30; 19 | public const int WARN = 30; 20 | public const int INFO = 20; 21 | public const int DEBUG = 10; 22 | public const int NOTSET = 0; 23 | 24 | public Logger getLogger(string name = "") 25 | { 26 | return new Logger(Instance.logging.getLogger(name)); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/MxNet/module/BaseModule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MxNet.module 6 | { 7 | public class BaseModule : Base 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/MxNet/module/Module.cs: -------------------------------------------------------------------------------- 1 | using MxNet.logging; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MxNet.module 7 | { 8 | public class Module : BaseModule 9 | { 10 | public Module(Symbol symbol, string[] data_names = null, string[] label_names = null, Logger logger = null, 11 | Context[] context = null, int[] work_load_list = null, string[] fixed_param_names = null, 12 | string[] state_names = null, Dictionary group2ctxs = null, 13 | Dictionary compression_params = null) 14 | { 15 | __self__ = Instance.mxnet.module.Module; 16 | Parameters["symbol"] = symbol; 17 | Parameters["data_names"] = data_names != null ? data_names : new string[] { "data" }; 18 | Parameters["label_names"] = label_names != null ? label_names : new string[] { "softmax_label" }; ; 19 | Parameters["logger"] = logger; 20 | Parameters["context"] = context != null ? context : new Context[] { Context.Default }; 21 | Parameters["work_load_list"] = work_load_list; 22 | Parameters["fixed_param_names"] = fixed_param_names; 23 | Parameters["state_names"] = state_names; 24 | Parameters["group2ctxs"] = group2ctxs; 25 | Parameters["compression_params"] = compression_params; 26 | Init(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/PillowSharp/PillowSharp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Python.Included/Python.Included.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Python.Included/PythonEnv.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Python.Included 6 | { 7 | public static class PythonEnv 8 | { 9 | /// 10 | /// Set PythonEnv.DeployEmbeddedPython to false to use system Python installation 11 | /// 12 | public static bool DeployEmbeddedPython { get; set; } = true; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Python.Included/Resources/python-3.7.3-embed-amd64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SciSharp/CodeMinion/b45346fc7501deaa2933c0040b4ddb2e1e33546e/src/Python.Included/Resources/python-3.7.3-embed-amd64.zip -------------------------------------------------------------------------------- /src/Torch/Models/Device.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | 3 | namespace Torch 4 | { 5 | public partial class Device : PythonObject 6 | { 7 | public Device(PyObject pyobj) : base(pyobj) 8 | { 9 | } 10 | 11 | public static implicit operator Device(string device) 12 | { 13 | if (device == null) 14 | return null; 15 | return torch.device(device); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Torch/Models/Dtype.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Python.Runtime; 5 | 6 | namespace Torch 7 | { 8 | 9 | public partial class Dtype : PythonObject 10 | { 11 | public Dtype(PyObject pyobj) : base(pyobj) 12 | { 13 | } 14 | 15 | public bool is_floating_point => self.GetAttr("is_floating_point").As(); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Torch/Models/Layout.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | 3 | namespace Torch 4 | { 5 | public partial class Layout : PythonObject 6 | { 7 | public Layout(PyObject pyobj) : base(pyobj) 8 | { 9 | } 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /src/Torch/Models/Storage.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | 3 | namespace Torch 4 | { 5 | public partial class Storage : PythonObject 6 | { 7 | public Storage(PyObject pyobj) : base(pyobj) 8 | { 9 | } 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.AdaptiveAvgPool1d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies a 1D adaptive average pooling over an input signal composed of several input planes.

20 | /// 21 | /// The output size is H, for any input size.

22 | /// 23 | /// The number of output features is equal to the number of input planes. 24 | ///
25 | public partial class AdaptiveAvgPool1d : Module 26 | { 27 | // auto-generated class 28 | 29 | public AdaptiveAvgPool1d(PyObject pyobj) : base(pyobj) { } 30 | 31 | public AdaptiveAvgPool1d(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | public AdaptiveAvgPool1d(int output_size) 34 | { 35 | //auto-generated code, do not change 36 | var nn = self.GetAttr("nn"); 37 | var __self__=nn; 38 | var pyargs=ToTuple(new object[] 39 | { 40 | output_size, 41 | }); 42 | var kwargs=new PyDict(); 43 | dynamic py = __self__.InvokeMethod("AdaptiveAvgPool1d", pyargs, kwargs); 44 | self=py as PyObject; 45 | } 46 | 47 | } 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.AdaptiveAvgPool2d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies a 2D adaptive average pooling over an input signal composed of several input planes.

20 | /// 21 | /// The output is of size H x W, for any input size.

22 | /// 23 | /// The number of output features is equal to the number of input planes. 24 | ///
25 | public partial class AdaptiveAvgPool2d : Module 26 | { 27 | // auto-generated class 28 | 29 | public AdaptiveAvgPool2d(PyObject pyobj) : base(pyobj) { } 30 | 31 | public AdaptiveAvgPool2d(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | public AdaptiveAvgPool2d(int output_size) 34 | { 35 | //auto-generated code, do not change 36 | var nn = self.GetAttr("nn"); 37 | var __self__=nn; 38 | var pyargs=ToTuple(new object[] 39 | { 40 | output_size, 41 | }); 42 | var kwargs=new PyDict(); 43 | dynamic py = __self__.InvokeMethod("AdaptiveAvgPool2d", pyargs, kwargs); 44 | self=py as PyObject; 45 | } 46 | 47 | } 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.AdaptiveAvgPool3d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies a 3D adaptive average pooling over an input signal composed of several input planes.

20 | /// 21 | /// The output is of size D x H x W, for any input size.

22 | /// 23 | /// The number of output features is equal to the number of input planes. 24 | ///
25 | public partial class AdaptiveAvgPool3d : Module 26 | { 27 | // auto-generated class 28 | 29 | public AdaptiveAvgPool3d(PyObject pyobj) : base(pyobj) { } 30 | 31 | public AdaptiveAvgPool3d(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | public AdaptiveAvgPool3d(int output_size) 34 | { 35 | //auto-generated code, do not change 36 | var nn = self.GetAttr("nn"); 37 | var __self__=nn; 38 | var pyargs=ToTuple(new object[] 39 | { 40 | output_size, 41 | }); 42 | var kwargs=new PyDict(); 43 | dynamic py = __self__.InvokeMethod("AdaptiveAvgPool3d", pyargs, kwargs); 44 | self=py as PyObject; 45 | } 46 | 47 | } 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Bilinear.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies a bilinear transformation to the incoming data: 20 | /// \(y = x_1 A x_2 + b\) 21 | /// 22 | public partial class Bilinear : Module 23 | { 24 | // auto-generated class 25 | 26 | public Bilinear(PyObject pyobj) : base(pyobj) { } 27 | 28 | public Bilinear(Module other) : base(other.PyObject as PyObject) { } 29 | 30 | public Bilinear(int in1_features, int in2_features, int out_features, bool bias = true) 31 | { 32 | //auto-generated code, do not change 33 | var nn = self.GetAttr("nn"); 34 | var __self__=nn; 35 | var pyargs=ToTuple(new object[] 36 | { 37 | in1_features, 38 | in2_features, 39 | out_features, 40 | }); 41 | var kwargs=new PyDict(); 42 | if (bias!=true) kwargs["bias"]=ToPython(bias); 43 | dynamic py = __self__.InvokeMethod("Bilinear", pyargs, kwargs); 44 | self=py as PyObject; 45 | } 46 | 47 | } 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ConstantPad1d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor boundaries with a constant value.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ConstantPad1d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ConstantPad1d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ConstantPad1d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ConstantPad1d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ConstantPad1d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ConstantPad2d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor boundaries with a constant value.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ConstantPad2d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ConstantPad2d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ConstantPad2d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ConstantPad2d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ConstantPad2d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ConstantPad3d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor boundaries with a constant value.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ConstantPad3d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ConstantPad3d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ConstantPad3d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ConstantPad3d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ConstantPad3d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ELU.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the element-wise function: 20 | /// 21 | /// \[\text{ELU}(x) = \max(0,x) + \min(0, \alpha * (\exp(x) - 1)) 22 | /// 23 | /// \] 24 | /// 25 | public partial class ELU : Module 26 | { 27 | // auto-generated class 28 | 29 | public ELU(PyObject pyobj) : base(pyobj) { } 30 | 31 | public ELU(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | public ELU(double alpha = 1.0, bool inplace = false) 34 | { 35 | //auto-generated code, do not change 36 | var nn = self.GetAttr("nn"); 37 | var __self__=nn; 38 | var pyargs=ToTuple(new object[] 39 | { 40 | }); 41 | var kwargs=new PyDict(); 42 | if (alpha!=1.0) kwargs["alpha"]=ToPython(alpha); 43 | if (inplace!=false) kwargs["inplace"]=ToPython(inplace); 44 | dynamic py = __self__.InvokeMethod("ELU", pyargs, kwargs); 45 | self=py as PyObject; 46 | } 47 | 48 | } 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Identity.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// A placeholder identity operator that is argument-insensitive. 20 | /// 21 | public partial class Identity : Module 22 | { 23 | // auto-generated class 24 | 25 | public Identity(PyObject pyobj) : base(pyobj) { } 26 | 27 | public Identity(Module other) : base(other.PyObject as PyObject) { } 28 | 29 | public Identity() 30 | { 31 | //auto-generated code, do not change 32 | var nn = self.GetAttr("nn"); 33 | var __self__=nn; 34 | dynamic py = __self__.InvokeMethod("Identity"); 35 | self=py as PyObject; 36 | } 37 | 38 | } 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Linear.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies a linear transformation to the incoming data: \(y = xA^T + b\) 20 | /// 21 | public partial class Linear : Module 22 | { 23 | // auto-generated class 24 | 25 | public Linear(PyObject pyobj) : base(pyobj) { } 26 | 27 | public Linear(Module other) : base(other.PyObject as PyObject) { } 28 | 29 | public Linear(int in_features, int out_features, bool bias = true) 30 | { 31 | //auto-generated code, do not change 32 | var nn = self.GetAttr("nn"); 33 | var __self__=nn; 34 | var pyargs=ToTuple(new object[] 35 | { 36 | in_features, 37 | out_features, 38 | }); 39 | var kwargs=new PyDict(); 40 | if (bias!=true) kwargs["bias"]=ToPython(bias); 41 | dynamic py = __self__.InvokeMethod("Linear", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.LogSigmoid.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the element-wise function: 20 | /// 21 | /// \[\text{LogSigmoid}(x) = \log\left(\frac{ 1 }{ 1 + \exp(-x)}\right) 22 | /// 23 | /// \] 24 | /// 25 | public partial class LogSigmoid : Module 26 | { 27 | // auto-generated class 28 | 29 | public LogSigmoid(PyObject pyobj) : base(pyobj) { } 30 | 31 | public LogSigmoid(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | 34 | } 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.LogSoftmax.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the \(\log(\text{Softmax}(x))\) function to an n-dimensional 20 | /// input Tensor.

21 | /// The LogSoftmax formulation can be simplified as: 22 | /// 23 | /// \[\text{LogSoftmax}(x_{i}) = \log\left(\frac{\exp(x_i) }{ \sum_j \exp(x_j)} \right) 24 | /// 25 | /// \] 26 | ///
27 | public partial class LogSoftmax : Module 28 | { 29 | // auto-generated class 30 | 31 | public LogSoftmax(PyObject pyobj) : base(pyobj) { } 32 | 33 | public LogSoftmax(Module other) : base(other.PyObject as PyObject) { } 34 | 35 | 36 | } 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ReLU.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the rectified linear unit function element-wise: 20 | /// 21 | /// \(\text{ReLU}(x)= \max(0, x)\) 22 | /// 23 | public partial class ReLU : Module 24 | { 25 | // auto-generated class 26 | 27 | public ReLU(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ReLU(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ReLU(bool? inplace = false) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (inplace!=false) kwargs["inplace"]=ToPython(inplace); 41 | dynamic py = __self__.InvokeMethod("ReLU", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ReLU6.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the element-wise function: 20 | /// 21 | /// \[\text{ReLU6}(x) = \min(\max(0,x), 6) 22 | /// 23 | /// \] 24 | /// 25 | public partial class ReLU6 : Module 26 | { 27 | // auto-generated class 28 | 29 | public ReLU6(PyObject pyobj) : base(pyobj) { } 30 | 31 | public ReLU6(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | public ReLU6(bool? inplace = false) 34 | { 35 | //auto-generated code, do not change 36 | var nn = self.GetAttr("nn"); 37 | var __self__=nn; 38 | var pyargs=ToTuple(new object[] 39 | { 40 | }); 41 | var kwargs=new PyDict(); 42 | if (inplace!=false) kwargs["inplace"]=ToPython(inplace); 43 | dynamic py = __self__.InvokeMethod("ReLU6", pyargs, kwargs); 44 | self=py as PyObject; 45 | } 46 | 47 | } 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ReflectionPad1d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor using the reflection of the input boundary.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ReflectionPad1d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ReflectionPad1d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ReflectionPad1d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ReflectionPad1d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ReflectionPad1d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ReflectionPad2d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor using the reflection of the input boundary.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ReflectionPad2d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ReflectionPad2d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ReflectionPad2d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ReflectionPad2d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ReflectionPad2d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ReplicationPad1d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor using replication of the input boundary.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ReplicationPad1d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ReplicationPad1d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ReplicationPad1d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ReplicationPad1d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ReplicationPad1d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ReplicationPad2d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor using replication of the input boundary.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ReplicationPad2d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ReplicationPad2d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ReplicationPad2d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ReplicationPad2d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ReplicationPad2d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ReplicationPad3d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor using replication of the input boundary.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ReplicationPad3d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ReplicationPad3d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ReplicationPad3d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ReplicationPad3d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ReplicationPad3d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Sigmoid.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the element-wise function: 20 | /// 21 | /// \[\text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)} 22 | /// 23 | /// \] 24 | /// 25 | public partial class Sigmoid : Module 26 | { 27 | // auto-generated class 28 | 29 | public Sigmoid(PyObject pyobj) : base(pyobj) { } 30 | 31 | public Sigmoid(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | 34 | } 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Softmax.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the Softmax function to an n-dimensional input Tensor 20 | /// rescaling them so that the elements of the n-dimensional output Tensor 21 | /// lie in the range [0,1] and sum to 1.

22 | /// 23 | /// Softmax is defined as: 24 | /// 25 | /// \[\text{Softmax}(x_{i}) = \frac{\exp(x_i)}{\sum_j \exp(x_j)} 26 | /// 27 | /// \] 28 | ///
29 | public partial class Softmax : Module 30 | { 31 | // auto-generated class 32 | 33 | public Softmax(PyObject pyobj) : base(pyobj) { } 34 | 35 | public Softmax(Module other) : base(other.PyObject as PyObject) { } 36 | 37 | 38 | } 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Softmax2d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies SoftMax over features to each spatial location.

20 | /// 21 | /// When given an image of Channels x Height x Width, it will 22 | /// apply Softmax to each location \((Channels, h_i, w_j)\) 23 | ///
24 | public partial class Softmax2d : Module 25 | { 26 | // auto-generated class 27 | 28 | public Softmax2d(PyObject pyobj) : base(pyobj) { } 29 | 30 | public Softmax2d(Module other) : base(other.PyObject as PyObject) { } 31 | 32 | 33 | } 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Softmin.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the Softmin function to an n-dimensional input Tensor 20 | /// rescaling them so that the elements of the n-dimensional output Tensor 21 | /// lie in the range [0, 1] and sum to 1.

22 | /// 23 | /// Softmin is defined as: 24 | /// 25 | /// \[\text{Softmin}(x_{i}) = \frac{\exp(-x_i)}{\sum_j \exp(-x_j)} 26 | /// 27 | /// \] 28 | ///
29 | public partial class Softmin : Module 30 | { 31 | // auto-generated class 32 | 33 | public Softmin(PyObject pyobj) : base(pyobj) { } 34 | 35 | public Softmin(Module other) : base(other.PyObject as PyObject) { } 36 | 37 | 38 | } 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Softsign.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the element-wise function: 20 | /// 21 | /// \[\text{SoftSign}(x) = \frac{x}{ 1 + |x|} 22 | /// 23 | /// \] 24 | /// 25 | public partial class Softsign : Module 26 | { 27 | // auto-generated class 28 | 29 | public Softsign(PyObject pyobj) : base(pyobj) { } 30 | 31 | public Softsign(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | 34 | } 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Tanh.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the element-wise function: 20 | /// 21 | /// \[\text{Tanh}(x) = \tanh(x) = \frac{e^x - e^{-x}} {e^x + e^{-x}} 22 | /// 23 | /// \] 24 | /// 25 | public partial class Tanh : Module 26 | { 27 | // auto-generated class 28 | 29 | public Tanh(PyObject pyobj) : base(pyobj) { } 30 | 31 | public Tanh(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | 34 | } 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.Tanhshrink.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Applies the element-wise function: 20 | /// 21 | /// \[\text{Tanhshrink}(x) = x - \text{Tanh}(x) 22 | /// 23 | /// \] 24 | /// 25 | public partial class Tanhshrink : Module 26 | { 27 | // auto-generated class 28 | 29 | public Tanhshrink(PyObject pyobj) : base(pyobj) { } 30 | 31 | public Tanhshrink(Module other) : base(other.PyObject as PyObject) { } 32 | 33 | 34 | } 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/Torch/Models/nn/torch.nn.ZeroPad2d.gen.cs: -------------------------------------------------------------------------------- 1 | // Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using Python.Runtime; 11 | using Numpy; 12 | using Numpy.Models; 13 | 14 | namespace Torch 15 | { 16 | public static partial class torch { 17 | public static partial class nn { 18 | /// 19 | /// Pads the input tensor boundaries with zero.

20 | /// 21 | /// For N-dimensional padding, use torch.nn.functional.pad(). 22 | ///
23 | public partial class ZeroPad2d : Module 24 | { 25 | // auto-generated class 26 | 27 | public ZeroPad2d(PyObject pyobj) : base(pyobj) { } 28 | 29 | public ZeroPad2d(Module other) : base(other.PyObject as PyObject) { } 30 | 31 | public ZeroPad2d(int padding = 0) 32 | { 33 | //auto-generated code, do not change 34 | var nn = self.GetAttr("nn"); 35 | var __self__=nn; 36 | var pyargs=ToTuple(new object[] 37 | { 38 | }); 39 | var kwargs=new PyDict(); 40 | if (padding!=0) kwargs["padding"]=ToPython(padding); 41 | dynamic py = __self__.InvokeMethod("ZeroPad2d", pyargs, kwargs); 42 | self=py as PyObject; 43 | } 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Torch/Models/utils/RemovableHandle.cs: -------------------------------------------------------------------------------- 1 | using Python.Runtime; 2 | 3 | namespace Torch 4 | { 5 | public static partial class torch 6 | { 7 | public static partial class utils 8 | { 9 | public static partial class hooks 10 | { 11 | public partial class RemovableHandle : PythonObject 12 | { 13 | public RemovableHandle(PyObject pyobj) : base(pyobj) 14 | { 15 | } 16 | 17 | public void remove() 18 | { 19 | self.InvokeMethod("remove"); 20 | } 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Torch/Torch.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | Torch 6 | Torch.NET 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/Torch.UnitTest/BaseTestCase.cs: -------------------------------------------------------------------------------- 1 | namespace Torch 2 | { 3 | public class BaseTestCase 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Torch.UnitTest/Torch.UnitTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp2.1 5 | 6 | false 7 | 8 | Torch 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | --------------------------------------------------------------------------------