Saravanan666/pypi-org huggingface dataset:
Package: tf-gnns
tf_gnns- A Hackable GraphNets libraryA library for easy construction of message-passing networks in tensorflow keras.
It is inspired largely by thisDeepMind paperand the corresponding open-sourced library (original graph_nets library)Thetf_gnnslibrary has no external dependencies except tensorflow 2.x (there is no support for tf 1.x graphs/sessions-based computation).
It implements some alternative design constraints fromgraph_netstaking advantage of some facilities keras provides to make complex models easily and without large drops in performance.tf_gnnsis built to support arbitrary node/edge/global attributes and update functions.
A set of convenience functions providing MLP construction with keras are also provided (i.e., handling input/output sizes for valid networks) that replaces sonnet.The main motivation for this library was the absense of a relatively short and efficient implementation of GNNs that was explicitly created to take advantage of keras's functionalities.
GNN implementations which take advantage oftensorflow_probabilityfunctionality are to be released in the future (as the one used in [2]).Installingtf_gnnsInstall withpip:pip install tf_gnnsExamplestf_gnnsbasicsYou may inspect some basic functionality on the following colab notebook:list sorting example(Example from the originaldeepmind/graph_netslibrary)
If you are familiar with the originalgraph_netslibrary, this example will help you understand how you can transition totf_gnns.Sort a list of elements.
This notebook and the accompanying code demonstrates how to use the Graph Nets library to learn to sort a list of elements.A list of elements is treated as a fully connected graph between the elements.
The network is trained to label the start node, and which (directed) edges correspond to the links to the next largest element, for each node.After training, the prediction ability is tested by comparing its output to true sorted lists. Then the network's ability to generalise is tested, by using it to sort larger lists.PerformanceFrom some initial tests the performance of thetf_gnnslibrary seems to be at least as good asdeepmind/graph_netswhen using tensor dictionaries.Publications usingtf_gnnsThe library has been used so far in the following publications:[1]Bayesian graph neural networks for strain-based crack localization[2]Remaining Useful Life Estimation Under Uncertainty with Causal GraphNets
Package: tf-gpu
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google's AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains. TensorFlow is licensed underApache
2.0.build environment is: 
cuda 11.8.0
cudnn 8.8
nccl 2.15 
tensorrt: 8.5  
nvidia Compute Capability 6.1 7.0 7.5 8.0 8.6,8.9buildhttps://github.com/nvidia/tensorflowbyhttps://github.com/ssbuildwith mkl support.
and test gpu pass as follow cuda 118  , any other you can try also.cuda 11.8.0   
cudnn 8.8   
nccl 2.15   
tensorrt: 8.5 可选安装     

docker pull ssdog/cuda:11.8.0-runtime-ubuntu18.04
docker pull ssdog/cuda:11.8.0-runtime-ubuntu20.04
docker pull ssdog/cuda:11.8.0-runtime-ubuntu22.04
docker pull ssdog/cuda:11.8.0-dev-ubuntu18.04
docker pull ssdog/cuda:11.8.0-dev-ubuntu20.04
docker pull ssdog/cuda:11.8.0-dev-ubuntu22.04
Package: tfgraph
TFGraph: Python's Tensorflow Graph Library=======.. |travisci| image:: https://img.shields.io/travis/tfgraph/tfgraph/master.svg?style=flat-square:target: https://travis-ci.org/tfgraph/tfgraph.. |codecov| image:: https://img.shields.io/codecov/c/github/tfgraph/tfgraph.svg?style=flat-square:target: https://codecov.io/gh/tfgraph/tfgraph?branch=master.. |docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat-square:target: http://tfgraph.readthedocs.io/en/latest/?badge=latest.. |gitter| image:: https://img.shields.io/gitter/room/tfgraph/tfgraph.svg?style=flat-square:target: https://gitter.im/tfgraph/tfgraph?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge.. |license| image:: https://img.shields.io/github/license/tfgraph/tfgraph.svg?style=flat-square:target: https://github.com/tfgraph/tfgraph.. |release| image:: https://img.shields.io/github/release/tfgraph/tfgraph.svg?style=flat-square:target: https://github.com/tfgraph/tfgraph|travisci| |codecov| |docs| |gitter| |license| |release|Description-----------This work consists of a study of a set of techniques and strategies related with algorithm's design, whose purpose is the resolution of problems on massive data sets, in an efficient way. This field is known as Algorithms for Big Data. In particular, this work has studied the Streaming Algorithms, which represents the basis of the data structures of sublinear order o(n) in space, known as Sketches. In addition, it has deepened in the study of problems applied to Graphs on the Semi-Streaming model. Next, the PageRank algorithm was analyzed as a concrete case study. Finally, the development of a library for the resolution of graph problems, implemented on the top of the intensive mathematical computation platform known as TensorFlow has been started.Content-------* `Source Code <https://github.com/tfgraph/tfgraph/blob/master/tfgraph>`__* `API Documentation <http://tfgraph.readthedocs.io/>`__* `Code Examples <https://github.com/tfgraph/tfgraph/blob/master/examples>`__* `Tests <https://github.com/tfgraph/tfgraph/blob/master/tests>`__How to install--------------If you have git installed, you can try::$ pip install git+https://github.com/tfgraph/tfgraph.gitIf you get any installation or compilation errors, make sure you have the latest pip and setuptools::$ pip install --upgrade pip setuptoolsHow to run the tests--------------------Install in editable mode and call `pytest`::$ pip install -e .$ pytest
Package: tfgraphviz
tfgraphviz is a module to visualize a TensorFlow’s data flow graph like TensorBoard using Graphviz. tfgraphviz enables to provide a visualization of tensorflow graph on Jupyter Notebook without TensorBoard.LinksGitHub:http://github.com/akimach/tfgraphvizPyPI:https://pypi.python.org/pypi/tfgraphvizJupyter Notebook:InstallationUse pip to install:$pipinstallgraphviz$pipinstalltfgraphvizThe only dependency is  Graphviz.macOS:$brewinstallgraphvizUbuntu:$apt-getinstallgraphvizQuickstartimporttensorflowastfimporttfgraphvizastfgg=tf.Graph()withg.as_default():a=tf.constant(1,name="a")b=tf.constant(2,name="b")c=tf.add(a,b,name="add")tfg.board(g)LicenseThis package is distributed under theMIT license.AuthorAkimasa KIMURA
Package: tfhelper
tfhelperYour friendly Tensorflow 2.x neighbor.Documentation:https://jeikeilim.github.io/tfhelper/EnvironmentsPython 3.7Getting startedpip installpip install tfhelperStructuretfhelper.datasetHDF5Generatorfromtfhelper.datasetimportHDF5Generatortrain_generator=HDF5Generator("/dataset/path.hdf5","training_data","test_data")train_dataset=train_generator.get_dataset(input_shape=(300,300),batch_size=16,shuffle=True,n_shuffle=1000)...model=Definesomemodelmodel.fit(train_dataset)tfhelper.gpuallow_gpu_memory_growthtfhelper.tensorboardConfuseCallbackModelSaverCallbackSparsityCallbackrun_tensorboardwait_ctrl_cget_tf_callbackstfhelper.tflitekeras_model_to_tfliteparse_configpredict_tflite_interpreterevaluate_tflite_interpreterload_pruned_modeltfhelper.transfler_learningget_transfer_learning_modeltfhelper.visualizationget_cam_image
Package: tf-hourglass-networks
tf.keras Implementation of Hourglass Models for Human Pose EstimationImplementation of the paperToward fast and accurate human pose estimation via soft-gated skip connectionsby Bulat et al. andStacked Hourglass Networks for Human Pose Estimationby Newell et al. using tensorflow keras.This work has been done as part of a student course atIntelligent Process Automation and Robotics Lab (IPR).Project setupInitial requirements:Python 3.8+Tensorflow GPU software requirementsfor TF>=2.5.0Through pippipinstallgit+https://github.com/benjs/hourglass_networks.gitFrom sourcegitclonehttps://github.com/benjs/hourglass_networks.githg-netscdhg-nets

python3-mvenvvenv/sourcevenv/bin/activate

pipinstall-rrequirements.txtTrainingStart training withpython -m hourglass.training --config default_config.yaml --visible-devices 0or in shortpython -m hourglass.training -c default_config.yaml -v 0Most parameters are adjusted in the config file and some can be changed through passing args.
Seepython -m hourglass.training --helpfor more information.Data setupDownload the mpii dataset images from theirofficial siteand the converted annotationstrain.h5andvalid.h5by Newell et al. from thestacked hourglass repository.
Specify the path to both parent directories in the config file.# Paths are relative to homempii_annot_dir:'mpii_annot'mpii_image_dir:'mpii_images'LoggingThe training process can be viewed either through tensorboard orWeights and Biases.
Adjust the following line in your config file.logger:'wandb'# or 'tensorboard'Config overwritingAddoverwrite_config: default_config.yamlto a config file to take all parameters from another config file and update them with the
parameters from the current file.
The files have to be in the same directory.Unit testsRun all unit tests withpython -m pytest
Package: tfhubartifact
tfhubartifactBentoML artifact framework for TensorFlow Hub models.Installation:pip install tfhubartifact==0.0.1Usage example (decorate service):from tfhubartifact.TensorFlowHubModelArtifact import TensorFlowHubModelArtifact

@artifacts([TensorFlowHubModelArtifact('embedder')])
class MyBentoService(BentoService):Usage example (package model):svc = MyBentoService()

svc.pack('embedder', my_embedding_model_path)Alternatively, during training:svc.pack('embedder', {'embedder': my_embedder})
Package: tfhub-styletransfer-wrapper
TF Hub WrapperThis package contains functions to properly load and process images for input to Google's TensorFlow
Hub v2 model for fast arbitrary image style transfer and obtain a style-transferred output image.Usage:First, install the package with pip:pip install tfhub-styletransfer-wrapperThen import the package:from tfhub_styletransfer_wrapper import StyleHubAnd call the hub evaluation function:stylehub = StyleHub()
stylehub.load_content(content_image_filename, 512)
stylehub.load_style(style_image_filename, 256)
stylized_image = stylehub.evaluate(True)This will "re-draw" the input image specified by "input_image.jpg" in a style similar to that found in the image
specified by "style_image.jpg".Note that while different style sizes can be used, the TensorFlow Hub v2 model
was trained on 256x256 images, so increasing the style_size parameter any higher than 256 is not recommended.More examples
Package: tfi
TFI provides a simple Python interface to any TensorFlow model. It does this by automatically generating a Python class on the fly.Here’s an example of using TFI with a SavedModel based onInception v1. This particular SavedModel has a singlepredictmethod and aSignatureDefthat looks something like:predict(images float <1,224,224,3>)->(categories string <1001>, scores float <1,1001>)TFI in Action>>>importtfi>>>InceptionV1=tfi.saved_model.as_class("./inception-v1.saved_model")Passing in dataTFI can automatically adapt any data you provide to the shape expected by the graph. Let’s take a random photo of a dog I found on the internet…>>>model=InceptionV1()>>>image=tfi.data.file("./dog-medium-landing-hero.jpg")>>>result=model.predict(images=[image])>>>categories,scores=result.categories,result.scores[0]If we print the top 5 probabilities, we see:>>>[(scores[i],categories[i].decode('utf-8'))foriinscores.argsort()[:-5:-1]][(0.80796158, 'bloodhound, sleuthhound'),
 (0.10305813, 'English foxhound'),
 (0.064740285, 'redbone'),
 (0.009166114, 'beagle')]Not bad!Image dataThetf.data.filefunction usesmimetypesto discover the right data decoder to use. If an input to a graph is an"image/*", TFI will automatically decode and resize the image to the proper size. In the example above, the JPEG image of a dog is automatically decoded and resized to 224x224.BatchesIf you look closely at the example code above, you’ll see that the images argument is actually an array. The class generated by TFI is smart enough to convert an array of images to an appropriately sized batch of Tensors.Graphs with variablesEach instance of the class has separate variables from other instances. If a graph’s variables are mutated during a session in a useful way, you can continue to use those mutations by calling methods again on that same instance.If you’d like to have multiple instances that do not interfere with one another, you can create a second instance and call methods on each of them separately.TFI and SavedModelsTFI uses the information in a SavedModel’s SignatureDefs to generate methods on the resulting class. The keyword argument names for each method are also pulled from info in the SignatureDef.The SavedModel used in the example was created using thetf.estimator.Estimator#export_savedmodelfunction.Getting StartedTFI is on PyPI, install it withpip install tfi.Future workAdaptingtfi.datafunctions to handle queues and datasets wouldn’t require much effort. If this is something you’d like me to do, pleasefile an issuewith your specific use case!Extendingtfi.datato support more formats is also quite straightforward.File an issuewith a specific format you’d like to see. For bonus points, include the expected tensor dtype and shape. For double bonus points, include a way for me to test it in a real model.It’s not very easy to create well-formed SavedModels today. If this is something you’d like TFI to do in the future…file an issue. ;)AcknowledgementsIf you’re curious, the photo used above was froma random Google image search.PyPI packaging was way easier because ofthis fantastic guide.
Package: tfIdfInheritVectorizer
TFIDFVectorizerTFIDFVectorizer is a custom implementation of the TF-IDF transformation algorithm, using scikit-learn's TfidfVectorizer as a base. The implementation is written in Python, making use of numpy, scikit-learn and other commonly used packages.The main aim of this implementation is to provide a simple and efficient way of transforming a collection of text documents into a matrix representation, which can then be used as input to various machine learning algorithms.InstallationThe package can be installed using pip:pipinstalltfIdfInheritVectorizerUsageTo use the TFIDFVectorizer, simply create an instance of the class and call its fit_transform method. The method takes a list of text documents as input, and returns a sparse matrix representation of the TF-IDF scores for each document.fromtfIdfInheritVectorizer.feature_extraction.vectorizerimportTFIDFVectorizertext_data=["This is the first document.","This is the second document.","And this is the third one.","Is this the first document?"]vectorizer=TFIDFVectorizer()tfidf=vectorizer.fit_transform(text_data)In addition to the fit_transform method, the TFIDFVectorizer also has a transform method that can be used to transform new text data into a matrix representation, given the model has already been fit to the training data.new_text_data=["This is a new document.","Is this a new one?"]new_tfidf=vectorizer.transform(new_text_data)ConfigurationThe TFIDFVectorizer has several parameters that can be configured to customize its behavior. Some of the most important parameters are:stop_words: a list of stop words that will be ignored during the tokenization processvectorizer=TFIDFVectorizer(stop_words=["is","the","this"])max_features: the maximum number of features to keep, based on term frequency across the entire corpus.vectorizer=TFIDFVectorizer(max_features=50)use_idf: a flag indicating whether to use the inverse document frequency (IDF) weighting.vectorizer=TFIDFVectorizer(use_idf=False)For a full list of parameters, see thescikit-learn documentationConclusionTFIDFVectorizer is a simple and efficient implementation of the TF-IDF transformation algorithm, suitable for use in various machine learning applications. By using scikit-learn as a base, it provides a wide range of customization options and can be easily integrated into existing machine learning workflows.LicenseMIT
Package: tfidf-matcher
tfidf_matcheris a package for fuzzymatching large datasets together.
Most fuzzy matching libraries likefuzzywuzzyget great results, but
don't scale well due to their O(n^2) complexity.How does it work?This package provides two functions:ngrams(): Simple ngram generator.matcher(): Matches a list of strings against a reference corpus.
Does this by:Vectorizing the reference corpus using TF-IDF into a
term-document matrix.Fitting a K-NearestNeighbours model to the sparse matrix.Vectorizing the list of strings to be matched and passing it in
to the KNN model to calculate the cosine distance (the OOTBcosine_similarityfunction in sklearn is very
memory-inefficient for our use case).Some data manipulation to emitk_matchesclosest matches.Yeah ok, but how do I use it?Define two lists; youroriginallist (list you want matches for) and
yourlookuplist (list you want to match against). Typically your
lookup list will be much longer than your original list. Pass them into
thematcherfunction along with the number of matches you want to
display from thelookuplist using thek_matchesargument. The
result will be a pandas DataFrame containing 1 row per item in youroriginallist, along withk_matchescolumns containing the closest
match from thelookuplist, and a match score for the closest match
(which is 1 - the cosine distance between the matches normalised to
[0,1])Simply import withimport tfidf_matcher as tm, and call the matcher
function withtm.matcher(). It takes the following arguments:original: List of strings you want to match.lookup: List of strings you want to match against.k_matches: Number of the closest results fromlookupto return
(1 per column).ngram_length: Length ofngramsused in the algorithm. Anecdotal
testing shows 2 or 3 to be optimal, but feel free to tinker.Strengths and WeaknessesQuick. Very quick.Can emit however many closest matches you want. I found that 3
worked best.Not very well tested so potentially unstable results. Worked well
for 640 company names matched against a lookup corpus of >700,000
company names.Who do I thank?For the method, thankJosh
TaylorandChris van den Berg. I wanted to adapt the methods to
work nicely on a company mathcing problem I was having, and decided to build out
my resultant code into a package for two reasons:Package building experience.Utility for future projects which may require large-domain fuzzy
matching.I understand the algorithms behind k-Nearest Neighbours & TF-IDF Vectorisation,
but it was through implementing the ideas in the blogs linked that I was able to
build this project out.
Package: tfidf-transformer-afiniti
TFIDF Transformer AfinitiA package for performing TF-IDF transformation on text data.
This project developing for an assessment:Create a framework that does tf-idf transformation, you can use sklearn's tfidf function.
Keep the following in mindHandle Edge Cases : what happens when new text data arrivesCreate Unit Tests : check failure scenariosAdd Docstrings : assume you will hand this code to some other SWEObey Engineering Best PracticesUse necessary inheritancesCreate a (pypi) package out of this framework.InstallationUse the package managerpipto install.pipinstalltfidf-transformer-afinitiUsagefromtfidf_transformer_afiniti.mainimportTfidfFrameworkframework=TfidfFramework()# Append some data to the data listdata=["This is the first document.","This document is the second document.","And this is the third one."]fordindata:framework.append_data(d)# Print the tf-idf matrixprint(framework.tfidf_matrix.toarray())# Add new onenew_data="this is a new test document"framework.append_data(new_data)# Print the tf-idf matrixprint(framework.tfidf_matrix.toarray())# Add new listnew_list_data=["And this is the realy fifth one.","And this is the finaly sixth one."]framework.append_list_data(new_list_data)# Print the tf-idf matrixprint(framework.tfidf_matrix.toarray())Usagepython-munittesttfidf_transformer_afiniti/tfidf_test.py
Package: tfields
OverviewTensors, tensor fields, graphs, mesh manipulation, CAD and more on the basis of numpy.ndarrays. All objects keep track of their coordinate system. Symbolic math operations work for object manipulation.Licensed under theMIT LicenseResourcesSource code:https://gitlab.mpcdf.mpg.de/dboe/tfieldsDocumentation:https://dboe.pages.mpcdf.de/tfieldsPypi:https://pypi.python.org/pypi/tfieldsFeaturesThe following features should be highlighted:TensorsTensorFieldsTensorMaps with fieldsMesh manipulation by graph theoryTODOReview of alternative/supplementary APIssympy.diffgeom:https://docs.sympy.org/latest/modules/diffgeom.html- Symbolic differential algebra implementation. It is not yet covering a broad variety of functionality and is not so well maintained.Units: You can find a comparison of modules handling units here:https://socialcompare.com/en/comparison/python-units-quantities-packages- astropy looks best to our understanding but sympy would integrated nicer without an additional package.
Package: tfignite
TfigniteTfignite is a project that stems fromignite. Ignite is a high-level library to help with training neural networks in PyTorch, while Tfignite bares similar design / api and is designed dedicated to tensorflow 2.0.For the full API reference, read theonline documentation. For example usage, check theexamplesdirectory.Why tfignite?Tfignite separates training/evaluation loop from model/dataset computation graph. This makes a single training/evaluation script highly portable to different project and developers only need to focus on how to build the model and dataset for their tasks. The difference fromKerasis that the training/evaluation loop is not part of Model's APIs; instead, developers define model forward pass function, which is then injected into the loop defined by anEngine. Users can also register event handlers in different phases of a training/evaluation loop (for e.g.ITERATION_STARTED).Apart from the aforementioned separation of model forward pass function and boilerplate loop inEngine(ignitehas full credits for this). Tfignite further reduce boilerplate code by defining theModel,Dataset,Callback,ArgumentParserinterfaces:Model: Defines thecreate_trainerand thecreate_evaluatorfunction, both of which injects a forward pass function to anEngineand returns it to the training/evaluation script.Dataset: Defines an unified interfaceDataset.createwrapping overtf.data.Dataset.Callback: Defines a interface to group relatedEngineevent handlers in different phases. For example,Checkpointerloads the checkpoint at the beginning of training and stores the checkpoint onEPOCH_COMPLETED.ArgumentParser: Inherited fromargparse.ArgumentParser, the parser pass itself to the Model and Dataset classes for parsing Model-specific and Dataset-specific arguments. This further separates the Model development and the training/evaluation script.Installationpip install tfignite
Package: tfilterpy
Thetfilterspypackage is a Python library for implementing Bayesian filter algorithms, widely used mathematical tools in estimation theory and control engineering.InstallationYou can install thetfilterspypackage via pip, the Python package installer. Open a terminal and type the following command:Supported MethodsCurrently, the following Bayesian filter algorithms are implemented intfilterspy:Kalman Filters: A class of linear estimators used in filtering and smoothing applications.Particle Filters: A family of sequential Monte Carlo methods used for sampling from posterior distributions.More methods will be added in the future.UsageHere's are examples of how to usetfilterspyto estimate the state of a noisy linear system using a Kalman filter in the example folder.ContributionIf you find a bug or have a feature request, please open an issue on the GitHub repository. Pull requests are welcome, but please open an issue first to discuss your changes.LicenseThis package is licensed under the MIT License.