Saravanan666/pypi-org huggingface dataset:
Package: torch-topological
pytorch-topological: A topological machine learning framework forpytorchpytorch-topological(ortorch_topological) is a topological machine
learning framework forPyTorch. It aims to
collectloss termsandneural network layersin order to simplify
building the next generation of topology-based machine learning tools.Topological machine learning in a nutshellTopological machine learningrefers to a new class of machine learning
algorithms that are able to make use of topological features in data
sets. In contrast to methods based on a purely geometrical point of
view, topological features are capable of focusing onconnectivity
aspectsof a data set. This provides an interesting fresh perspective
that can be used to create powerful hybrid algorithms, capable of
yielding more insights into data.This is anemerging research field, firmly rooted in computational
topology and topological data analysis. If you want to learn more about
how topology and geometry can work in tandem, here are a few resources
to get you started:Amézquita et al.,The Shape of Things to Come: Topological Data Analysis and Biology,
from Molecules to Organisms, Developmental Dynamics
Volume 249, Issue 7, pp. 816--833, 2020.Hensel et al.,A Survey of Topological Machine Learning Methods,
Frontiers in Artificial Intelligence, 2021.Installation and requirementstorch_topologicalrequires Python 3.9. More recent versions might work
but necessitate building some dependencies by yourself; Python 3.9
currently offers the smoothest experience.
It is recommended to use the excellentpoetryframework
to installtorch_topological:poetry add torch-topologicalAlternatively, usepipto install the package:pip install -U torch-topologicalUsagetorch_topologicalis still a work in progress. You canbrowse the documentationor, if code reading is more your thing, dive directly intosome example
code.Here is a list ofotherprojects that are usingtorch_topological:SHAPR, a method for for
predicting the 3D cell shape of individual cells based on 2D
microscopy imagesThis list is incomplete---you can help expanding it by usingtorch_topologicalin your own projects! :innocent:ContributingCheck out thecontribution guidelinesor theroad
mapof the project.AcknowledgementsOur software and research does not exist in a vacuum.pytorch-topologicalis standing
on the shoulders of proverbial giants. In particular, we want to thank the
following projects for constituting the technical backbone of the
project:giotto-tdagudhiFurthermore,pytorch-topologicaldraws inspiration from several
projects that provide a glimpse into the wonderful world of topological
machine learning:difftdabyMathieu CarrièreRipserbyUlrich BauerTeaspoonbyElizabeth Munchand her teamTopologyLayerbyRickard Brüel Gabrielssontopological-autoencodersbyMichael Moor,Max Horn, andBastian RiecktorchphbyChristoph HoferandRoland KwittFinally,pytorch-topologicalmakes heavy use ofPOT, the Python Optimal Transport Library.
We are indebted to the many contributors of all these projects.
Package: torch-tps
torch-tpsImplementation of Thin Plate Spline.
(See numpy implementation with thin-plate-spline library)InstallPip$pipinstalltorch-tpsCondaNot yet availableGetting startedimporttorchfromtpsimportThinPlateSpline# Some dataX_c=torch.normal(0,1,(800,3))X_t=torch.normal(0,2,(800,2))X=torch.normal(0,1,(300,3))# Create the tps objecttps=ThinPlateSpline(alpha=0.0)# 0 Regularization# Fit the control and target pointstps.fit(X_c,X_t)# Transform new pointsY=tps.transform(X)Also have a look atexample.pyBuild and Deploy$python-mbuild
$python-mtwineuploaddist/*
Package: torchtrail
torchtrailtorchtrailprovides an external API to trace pytorch models and extract the graph of torch functions and modules that were executed. The graphs can then be visualized or used for other purposes.Installation InstructionsOn MacOsbrewinstallgraphviz
pipinstalltorchtrailOn Ubuntusudoapt-getinstallgraphviz
pipinstalltorchtrailExamplesTracing a functionimporttorchimporttorchtrailwithtorchtrail.trace():input_tensor=torch.rand(1,64)output_tensor=torch.exp(input_tensor)torchtrail.visualize(output_tensor,file_name="exp.svg")The graph could be obtained as anetworkx.MultiDiGraphusingtorchtrail.get_graph:graph:"networkx.MultiDiGraph"=torchtrail.get_graph(output_tensor,as_networkx=True)Tracing a moduleimporttorchimporttransformersimporttorchtrailmodel_name="google/bert_uncased_L-4_H-256_A-4"config=transformers.BertConfig.from_pretrained(model_name)config.num_hidden_layers=1model=transformers.BertModel.from_pretrained(model_name,config=config).eval()withtorchtrail.trace():input_tensor=torch.randint(0,model.config.vocab_size,(1,64))output=model(input_tensor).last_hidden_statetorchtrail.visualize(output,max_depth=1,file_name="bert_max_depth_1.svg")torchtrail.visualize(output,max_depth=2,file_name="bert_max_depth_2.svg")The graph of the full module can be visualized by omittingmax_depthargumenttorchtrail.visualize(output,file_name="bert.svg")The graph could be obtained as anetworkx.MultiDiGraphusingtorchtrail.get_graph:graph:"networkx.MultiDiGraph"=torchtrail.get_graph(output_tensor,as_networkx=True)Alternatively, visualization of the modules can be turned off completely usingshow_modules=Falsetorchtrail.visualize(output,show_modules=False,file_name="bert_show_modules_False.svg")The flattened graph could be obtained as anetworkx.MultiDiGraphusingtorchtrail.get_graph:graph:"networkx.MultiDiGraph"=torchtrail.get_graph(output_tensor,as_networkx=True,flatten=True)Referencetorchtrailwas inspired bytorchview.mert-kurttutandid an amazing job with displaying torch graphs. However, one of the goals oftorchtrailincluded producingnetworkx-compatible graph, thereforetorchtrailwas written.The idea to use persistent MultiDiGraph to trace torch operations was taken fromcomposit
Package: torchtrain
🔥 torchtrain 💪A small tool for PyTorch training.FeaturesAvoid boilerplate code for training.Stepwise training.Automatic TensorBoard logging, and tqdm bar.Count model parameters and save hyperparameters.DataParallel.Early stop.Save and load checkpoint. Continue training.Catch out of memory exceptions to avoid breaking training.Gradient accumulation.Gradient clipping.Only run few epochs, steps and batches for code test.Installpip install torchtrainExampleCheck doc string ofTrainerclassfor detailed configurations.An incomplete minimal example:data_iter=get_data()model=Bert()optimizer=Adam(model.parameters(),lr=cfg["lr"])criteria={"loss":AverageAggregator(BCELoss())}trainer=Trainer(model,data_iter,criteria,cfg,optimizer)trainer.train(stepwise=True)Or this version:fromargparseimportArgumentParserfromsklearn.model_selectionimportParameterGridfromtorch.optimimportAdamfromtorch.optim.lr_schedulerimportLambdaLRfromtransformersimportAutoModel,BertTokenizerfromdata.loadimportget_batch_size,get_datafrommetricsimportBCELossfrommodelsimportBertSumExtfromtorchtrainimportTrainerfromtorchtrain.metricsimportAverageAggregatorfromtorchtrain.utilsimportset_random_seedsdefget_args():parser=ArgumentParser()parser.add_argument("--seed",type=int,default=233666)parser.add_argument("--run_ckp",default="")parser.add_argument("--run_dataset",default="val")parser.add_argument("--batch_size",type=int,default=64)parser.add_argument("--warmup",type=int,default=10000)parser.add_argument("--stepwise",action="store_false")# torchtrain cfgsparser.add_argument("--max_n",type=int,default=50000)parser.add_argument("--val_step",type=int,default=1000)parser.add_argument("--save_path",default="/tmp/runs")parser.add_argument("--model_name",default="BertSumExt")parser.add_argument("--cuda_list",default="2,3")parser.add_argument("--grad_accum_batch",type=int,default=1)parser.add_argument("--train_few",action="store_true")returnvars(parser.parse_args())defget_param_grid():param_grid=[{"pretrained_model_name":["voidful/albert_chinese_tiny"],"lr":[6e-5]},]returnParameterGrid(param_grid)defget_cfg(args={},params={}):cfg={**args,**params}# other cfgsreturncfgdefrun(cfg):set_random_seeds(cfg["seed"])tokenizer=BertTokenizer.from_pretrained(cfg["pretrained_model_name"])bert=AutoModel.from_pretrained(cfg["pretrained_model_name"])data_iter=get_data(cfg["batch_size"],tokenizer,bert.config.max_position_embeddings)model=BertSumExt(bert)optimizer=Adam(model.parameters(),lr=cfg["lr"])scheduler=LambdaLR(optimizer,lambdastep:min(step**(-0.5),step*(cfg["warmup"]**(-1.5)))ifstep>0else0,)criteria={"loss":AverageAggregator(BCELoss())}trainer=Trainer(model,data_iter,criteria,cfg,optimizer,scheduler,get_batch_size=get_batch_size,)ifcfg["run_ckp"]:returntrainer.test(cfg["run_ckp"],cfg["run_dataset"])returntrainer.train(stepwise=cfg["stepwise"])defmain():param_grid=get_param_grid()fori,paramsinenumerate(param_grid):print("Config",str(i+1),"/",str(len(param_grid)))cfg=get_cfg(get_args(),params)metrics=run(cfg)print("Best metrics:",metrics)if__name__=="__main__":main()
Package: torch-train
torch-trainTraining wrapper around torch.nn.Module, provides scikit-learn like fit and predict interfaces.InstallationThe easiest way to install is through pippip install torch-trainDependenciesThe torch-train is an extension of the pytorch library.
Therefore, when installed manually, ensure pytorch is installed.
Either through pip:pip install torchSeehttps://pytorch.org/for a detailed installation guide.DocumentationFor a full reference, please seetorch-train.readthedocs.io.
Package: torchtrainer
torchtrainerPyTorch model training made simpler without loosing control. Focus on optimizing your model! Concepts are heavily inspired by the awesome projecttorchsampleandKeras.
Further, besides applying Epoch Callbacks it also allows to call Callbacks every time after a specific number of batches passed (iterations) for long epoch durations.FeaturesTorchtrainerLogging utilitiesMetricsVisdom VisualizationLearning Rate SchedulerCheckpointingFlexible for muliple data inputsSetup validation after every ... batchesUsageInstallationpipinstalltorchtrainerExamplefromtorchimportnnfromtorch.optimimportSGDfromtorchtrainerimportTorchTrainerfromtorchtrainer.callbacksimportVisdomLinePlotter,ProgressBar,VisdomEpoch,Checkpoint,CSVLogger,\EarlyStoppingEpoch,ReduceLROnPlateauCallbackfromtorchtrainer.metricsimportBinaryAccuracymetrics=[BinaryAccuracy()]train_loader=...val_loader=...model=...loss=nn.BCELoss()optimizer=SGD(model.parameters(),lr=0.001,momentum=0.9)# Setup Visdom Environment for your modlplotter=VisdomLinePlotter(env_name=f'Model{11}')# Setup the callbacks of your choicecallbacks=[ProgressBar(log_every=10),VisdomEpoch(plotter,on_iteration_every=10),VisdomEpoch(plotter,on_iteration_every=10,monitor='binary_acc'),CSVLogger('test.csv'),Checkpoint('./model'),EarlyStoppingEpoch(min_delta=0.1,monitor='val_running_loss',patience=10),ReduceLROnPlateauCallback(factor=0.1,threshold=0.1,patience=2,verbose=True)]trainer=TorchTrainer(model)# function to transform batch into inputs to your model and y_true values# if your model accepts multiple inputs, just put all inputs into a tuple (input1, input2), y_truedeftransform_fn(batch):inputs,y_true=batchreturninputs,y_true.float()# prepare your trainer for trainingtrainer.prepare(optimizer,loss,train_loader,val_loader,transform_fn=transform_fn,callbacks=callbacks,metrics=metrics)# train your modelresult=trainer.train(epochs=10,batch_size=10)CallbacksLoggerCSVLoggerCSVLoggerIterationProgressBarVisualization and LoggingVisdomEpochOptimizersReduceLROnPlateauCallbackStepLRCallbackRegularizationEarlyStoppingEpochEarlyStoppingIterationCheckpointingCheckpointCheckpointIterationMetricsCurrently onlyBinaryAccuracyis implemented. To implement other Metrics use the abstract base metric classtorchtrainer.metrics.metric.Metric.TODOmore testsmetrics
Package: torch-training-loop
⚠️The package is under development, expect bugs and breaking changes!Torch Training LoopSimple Keras-inspired Training Loop for Pytorch.Installationpip install torch-training-loopFeaturesSimple API for training Torch models;Support trainingDataParallelandDistributedDataParallelmodels;Support Keras-like callbacks for logging metrics to Tensorboard, model checkpoint,
and early stopping;Show training & validation progress viatqdm;Display metrics during training & validation viatorcheval.UsageThis package consists of two main classes for training Torch models:TrainingLoopandSimpleTrainingStep.
In order to train a torch model, you need to initiate these two classes:importtorchfromtorch.optimimportAdamfromtorcheval.metricsimportMulticlassAccuracyfromtraining_loopimportTrainingLoop,SimpleTrainingStepfromtraining_loop.callbacksimportEarlyStoppingmodel=...# Support training DataParallel models.# model = DataParallel(model)train_dataloader=...val_dataloader=...loop=TrainingLoop(model,step=SimpleTrainingStep(optimizer_fn=lambdaparams:Adam(params,lr=0.0001),loss=torch.nn.CrossEntropyLoss(),metrics=('accuracy',MulticlassAccuracy(num_classes=10)),),device='cuda',)loop.fit(train_dataloader,val_dataloader,epochs=10,callbacks=[EarlyStopping(monitor='val_loss',mode='min',patience=20),],)In the above example, initializing theSimpleTrainingStepclass and
calling thefit()method of theTrainingLoopclass are very similar to that of Keras API.
Additionally, you can also trainDistributedDataParallelmodels to utilize multigpus setup.
Currently, it only supports training on single-node multigpus machines.fromcontextlibimportcontextmanagerimportosimporttorchimporttorch.distributedasdistimporttorch.multiprocessingasmpfromtorch.nn.parallelimportDistributedDataParallelasDDPfromtorch.optimimportAdamfromtorcheval.metricsimportMulticlassAccuracyfromtraining_loopimportSimpleTrainingStepfromtraining_loop.distributedimportDistributedTrainingLoop@contextmanagerdefsetup_ddp(rank,world_size):os.environ['MASTER_ADDR']='localhost'os.environ['MASTER_PORT']='12355'dist.init_process_group('nccl',rank=rank,world_size=world_size)try:yieldfinally:os.environ.pop('MASTER_ADDR')os.environ.pop('MASTER_PORT')dist.destroy_process_group()deftrain_ddp(rank,world_size):withsetup_ddp(rank,world_size):model=...model=DDP(model,device_ids=[rank])train_loader=...val_loader=...loop=DistributedTrainingLoop(model,step=SimpleTrainingStep(optimizer_fn=lambdaparams:Adam(params,lr=0.0001),loss=torch.nn.CrossEntropyLoss(),metrics=('accuracy',MulticlassAccuracy(num_classes=10)),),device=rank,rank=rank,)loop.fit(train_loader,val_loader,epochs=1)defmain():world_size=torch.cuda.device_count()mp.spawn(train_ddp,args=(world_size,),nprocs=world_size,join=True,)return0if__name__=='__main__':exit(main())You can find more examples and documentation in the source code and in theexamplesfolder.LicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.
Package: torch-train-loop
jsac'storch_train_looptorch_train_loopis a general-purpose train-loop forPyTorchmodels, with some convenient features built-in:Integration withTensorBoard(via PyTorch'sSummaryWriter) for
plotting:Training lossValidation lossAdditional optional metricsProgress bar(s) (viatqdm) for Jupyter Notebooks or CLI environments.Early stoppingoverfitting detection.
Package: torchtree
torchtreeInstallationUse an Anaconda environment (Optional)condaenvcreate-fenvironment.yml
condaactivatetorchtreeThe easy wayTo install the latest stable version, runpipinstalltorchtreeUsing the source codegitclonehttps://github.com/4ment/torchtreecdtorchtree
pipinstall.Check installtorchtree--helpQuick starttorchtree will approximate the posterior distribution of an unrooted tree with a JC69 substitution model using variational inferencetorchtreeexamples/advi/fluA.jsonThe JSON file can be generated using the torchtree CLItorchtree-cliadvi-idata/fluA.fa-tdata/fluA.tree>fluA.json
Package: torchtree-scipy
torchtree-scipyAbout torchtree-scypitorchtree-scipyis a package that enhances the functionalities oftorchtreeby incorporating additional features fromSciPy.DependenciesSciPytorchtreeInstallationInstalling from sourcegitclonehttps://github.com/4ment/torchtree-scipy
pipinstalltorchtree-scipy/Installing latest stable versionYou can installtorchtree-scipyand its dependencies from PyPI with:pip install torchtree-scipyCheck installIf the installation was succesfull, this command should print the version of thetorchtree_scipylibrarypython-c"import torchtree_scipy;print(torchtree_scipy.__version__)"Command line argumentsThetorchtree-scipyplugin adds these arguments to the torchtree CLI:torchtree-cliadvi--help...--scipy_gamma_siteusetheGammaSiteModelimplementedwithscipyFeaturesDiscrete gamma site modelThis model implements the discretized gamma distribution to model rate heterogeity accross sites. The gradient of this model with respect to the shape parameter is calculated numerically using finite differences.
The easiest way to use this model is to use the argument--scipy_gamma_site. This sets the type of the site model totorchtree_scipy.GammaSiteModelin the JSON configuration file. The default step size isepsilon=1.0e-6but it can be changed manually in the JSON file.LicenseDistributed under the GPLv3 License. SeeLICENSEfor more information.Acknowledgementstorchtree-scipy makes use of the following libraries and tools, which are under their own respective licenses:PyTorchSciPytorchtree
Package: torch_tresnet
Packaged TResNet based on Official PyTorch Implementation
[paper]
[github]InstallationInstall with pip:pip install torch_tresnetor directly:pip install git+https://github.com/tczhangzhi/torch-tresnetUseFollow the grammatical conventions of torchvisionfrom torch_tresnet import tresnet_m, tresnet_l, tresnet_xl, tresnet_m_448, tresnet_l_448, tresnet_xl_448

# pretrianed on 224*224
model = tresnet_m(pretrain=True)
model = tresnet_m(pretrain=True, num_classes=10)
model = tresnet_m(pretrain=True, num_classes=10, in_chans=3)

# pretrianed on 448*448
model = tresnet_m_448(pretrain=True)
model = tresnet_m_448(pretrain=True, num_classes=10)
model = tresnet_m_448(pretrain=True, num_classes=10, in_chans=3)Main ResultsTResNet ModelsTResNet models accuracy and GPU throughput on ImageNet, compared to
ResNet50. All measurements were done on Nvidia V100 GPU, with mixed
precision. All models are trained on input resolution of 224.ModelsTop Training Speed (img/sec)Top Inference Speed (img/sec)Max Train Batch SizeTop-1 Acc.ResNet50805283028879.0EfficientNetB1440274019679.2TResNet-M730293051280.7TResNet-L345139031681.4TResNet-XL250106024082.0Comparison To Other NetworksComparison of ResNet50 to top modern networks, with similar top-1
ImageNet accuracy. All measurements were done on Nvidia V100 GPU with
mixed precision. For gaining optimal speeds, training and inference were
measured on 90% of maximal possible batch size. Except TResNet-M, all
the models’ ImageNet scores were taken from thepublic
repository, which
specialized in providing top implementations for modern networks. Except
EfficientNet-B1, which has input resolution of 240, all other models
have input resolution of 224.ModelTop Training Speed (img/sec)Top Inference Speed (img/sec)Top-1 Acc.Flops[G]ResNet50805283079.04.1ResNet50-D600267079.34.4ResNeXt50490194078.54.3EfficientNetB1440274079.20.6SEResNeXt50400177079.04.3MixNet-L400140079.00.5TResNet-M730293080.75.5Transfer Learning SotA ResultsComparison of TResNet to state-of-the-art models on transfer learning
datasets (only ImageNet-based transfer learning results). Models
inference speed is measured on a mixed precision V100 GPU. Since no
official implementation of Gpipe was provided, its inference speed is
unknown.DatasetModelTop-1 Acc.Speed img/secInputCIFAR-10Gpipe99.0480CIFAR-10TResNet-XL99.01060224CIFAR-100EfficientNet-B791.770600CIFAR-100TResNet-XL91.51060224Stanford CarsEfficientNet-B794.770600Stanford CarsTResNet-L96.0500368Oxford-FlowersEfficientNet-B798.870600Oxford-FlowersTResNet-L99.1500368
Package: torchts
TorchTS is a PyTorch-based library for time series data.Currently under active development!Why Time Series?Time series data modeling has broad significance in public health, finance and engineering. Traditional time series methods from statistics often rely on strong modeling assumptions, or are computationally expensive. Given the rise of large-scale sensing data and significant advances in deep learning, the goal of the project is to develop an efficient and user-friendly deep learning library that would benefit the entire research community and beyond.Why TorchTS?Existing time series analysis libraries includestatsmodelsandsktime. However, these libraries only include traditional statistics tools such as ARMA or ARIMA, which do not have the state-of-the-art forecasting tools based on deep learning.GluonTSis an open-source time series library developed by Amazon AWS, but is based on MXNet.Pyrois a probabilistic programming framework based on PyTorch, but is not focused on time series forecasting.InstallationInstallation RequirementsTorchTS supports Python 3.7+ and has the following dependencies:PyTorchPyTorch LightningSciPyInstalling the latest releaseThe latest release of TorchTS is easily installed either viapip:pipinstalltorchtsor viacondafrom theconda-forgechannel (coming soon):condainstalltorchts-cconda-forgeYou can customize your PyTorch installation (i.e. CUDA version, CPU only option)
by following thePyTorch installation instructions.Important note for MacOS users:Make sure your PyTorch build is linked against MKL (the non-optimized version
of TorchTS can be up to an order of magnitude slower in some settings).
Setting this up manually on MacOS can be tricky - to ensure this works properly,
please follow thePyTorch installation instructions.If you need CUDA on MacOS, you will need to build PyTorch from source. Please
consult the PyTorch installation instructions above.Getting StartedCheck out ourdocumentationandtutorials(coming soon).Citing TorchTSIf you use TorchTS, please cite the following paper (coming soon):TorchTS: A Framework for Efficient Time Series Modeling@inproceedings{TBD,title={{TorchTS: A Framework for Efficient Time Series Modeling}},author={TBD},booktitle={TBD},year={TBD},url={TBD}}Seehere(coming soon) for a selection of peer-reviewed papers that either build off of TorchTS or were integrated into TorchTS.ContributingInterested in contributing to TorchTS? Please see thecontributing guideto learn how to help out.LicenseTorchTS isMIT licensed.
Package: torchtuples
torchtuplestorchtuplesis a small python package for training PyTorch models.
It works equally well fornumpy arraysandtorch tensors.
One of the main benefits oftorchtuplesis that it handles data in the form of nested tuples (seeexample below).Installationtorchtuplesdepends onPyTorchwhich should be installed fromHERE.Next,torchtuplescan be installed with pip:pipinstalltorchtuplesOr, via conda:condainstall-cconda-forgetorchtuplesFor the bleeding edge version, install directly from github (consider adding--force-reinstall):pipinstallgit+git://github.com/havakv/torchtuples.gitor by cloning the repo:gitclonehttps://github.com/havakv/torchtuples.gitcdtorchtuples
pythonsetup.pyinstallExampleimporttorchfromtorchimportnnfromtorchtuplesimportModel,optimMake a data set with three sets of covariatesx0,x1andx2, and a targety.
The covariates are structured in a nested tuplex.n=500x0,x1,x2=[torch.randn(n,3)for_inrange(3)]y=torch.randn(n,1)x=(x0,(x0,x1,x2))Create a simple ReLU net that takes as input the tensorx_tensorand the tuplex_tuple. Note thatx_tuplecan be of arbitrary length. The tensors inx_tupleare passed through a layerlin_tuple, averaged, and concatenated withx_tensor.
We then pass our new tensor through the layerlin_cat.classNet(nn.Module):def__init__(self):super().__init__()self.lin_tuple=nn.Linear(3,2)self.lin_cat=nn.Linear(5,1)self.relu=nn.ReLU()defforward(self,x_tensor,x_tuple):x=[self.relu(self.lin_tuple(xi))forxiinx_tuple]x=torch.stack(x).mean(0)x=torch.cat([x,x_tensor],dim=1)returnself.lin_cat(x)defpredict(self,x_tensor,x_tuple):x=self.forward(x_tensor,x_tuple)returntorch.sigmoid(x)We can now fit the model withmodel=Model(Net(),nn.MSELoss(),optim.SGD(0.01))log=model.fit(x,y,batch_size=64,epochs=5)and make predictions with either theNet.predictmethodpreds=model.predict(x)or with theNet.forwardmethodpreds=model.predict_net(x)For more examples, see theexamples folder.