Categories
Misc

How to sample from Naive Bayes PDF and pass it to a discriminator model?

Hey! Sorry, if this question does not make 100% sense as my
education has not yet reached formal ML classes, but I’ll ask
nonetheless.

I want to make a GAN in tensorflow, but instead of just copy and
pasting someone’s code, I want to truly understand the bits and
parts of it.

From what I know about Naive Bayes, it predicts the distribution
of our original data – but after each iteration how can one sample
from this distribution, and additionally once you take a sample
from this distribution, how can we actually in code pass it to our
discriminator?

Thanks everyone 🙂

submitted by /u/20gunasart

[visit reddit]

[comments]

Categories
Misc

My test data seems to be tailing off. Whereas response is as below. Using relu activation function, what am I missing?


My test data seems to be tailing off. Whereas response is as below. Using relu activation function, what am I missing?
submitted by /u/ep_es_

[visit reddit]

[comments]
Categories
Misc

My test data seems to be tailing off. Whereas response is as below. Using relu activation function, what am I missing?


My test data seems to be tailing off. Whereas response is as below. Using relu activation function, what am I missing?
submitted by /u/ep_es_

[visit reddit]

[comments]
Categories
Misc

Upcoming Webinars: Learn how to use NVIDIA NGC Jupyter Notebook

Image segmentation and recommender system Jupyter notebooks are now available in the NGC catalog. These Jupyter notebooks come with complete instructions on how to train these models using the resources from the NGC catalog.

Image segmentation and recommender system Jupyter notebooks are now available in the NGC catalog. These Jupyter notebooks come with complete instructions on how to train these models using the resources from the NGC catalog

Upcoming Webinars

The NVIDIA NGC team is hosting two webinars with live Q&A to dive into two new Jupyter notebooks available from the NGC catalog. Learn how to use these resources to kickstart your AI journey.

NVIDIA NGC Jupyter Notebook Day: Image Segmentation

February 18 at 9 a.m. PT

Image segmentation deals with placing each pixel of an image into specific classes that share common characteristics. 

In this session, you’ll learn:

  • How to use a Jupyter notebook containing a pre-trained image segmentation model that can be used to detect defective parts in an industrial application
  • How to refine the model by retraining the model using your own hyperparameters and test it using your own checkpoints

Register now >> 

NVIDIA NGC Jupyter Notebook Day: Recommender System

February 18 at 11 a.m. PT

Recommender systems deal with predicting user preferences for products based on historical behavior or actions and are widely used in online retail, social media, streaming video, music platforms, and more. 

In this session, you’ll learn:

  • How to leverage a Jupyter notebook containing a pre-trained recommender system model that can be used to recommend a movie based on a user’s viewing history
  • How to refine the model by retraining the model using your own hyperparameters and test it using your own checkpoints

Register now >>

Categories
Misc

Tool for Complex Data Labelling Tasks

Hi /r/tensorflow
readers!

We have created a labelling
tool
that can be customized to display all sorts of data models
and tasks. Here are a couple of examples for NLP
and CV.

I hope some of you will find this useful, and if you have any
thoughts I would love to hear your feedback!

submitted by /u/bernatfp

[visit reddit]

[comments]

Categories
Misc

Constrain outputs in a regression problem

Hi, everyone.

I am attempting to constrain some outputs of my regression
network, say x, y, z = model(data), where x, y, z are scalars. The
constrain that I want to impose is that when predicting all three
dependent variables, the condition “x + y <=1.0” must be
honored. Given this description, can I implement this in a forward
function?

Thank you!

submitted by /u/ncuxomun

[visit reddit]

[comments]

Categories
Misc

Jetson Project of the Month: Blinkr – Blink Detection and Reminder

The project, which runs on a NVIDIA Jetson Nano 2GB Developer Kit, monitors the eyes of the user and voices a prompt when their blink rate is less than the recommended rate of 10 blinks per minute.

Thirteen-year-old Adrit Rao, was awarded the Jetson Project of the Month for his Blink Detection and Reminder (Blinkr). The project, which runs on a NVIDIA Jetson Nano 2GB Developer Kit, monitors the eyes of the user and voices a prompt when their blink rate is less than the recommended rate of 10 blinks per minute. 

Several studies have shown that low eye blinking rate, usually triggered by the use of a computer screen, is the leading cause of computer vision syndrome and other related disorders. To address this problem, Adrit created Blinkr with a simple setup of Jetson Nano 2GB Developer Kit, a webcam (or a Raspberry Pi v2 camera), a speaker and a few other basic peripherals.

The camera monitors the face of the user and feeds the frames to the Jetson Nano. To detect blinking, Adrit uses a 68 point facial landmark pre-trained model available in the Dlib open source library. Eyes are detected in each frame and the eye aspect ratio (EAR) is calculated and used to record the number of blinks over time. When the total blinks in a minute is less than the recommended rate, the speaker voices an alarm urging the user to blink more. 




Blinkr – Introduction video 

Many of us working from home do not have the usual prompts or interruptions during our day to move away from our screens. Tools like Blinkr can help us adopt healthy screen habits. This is a great project to build at home to learn about Jetson and AI, and to protect your eyesight. 

This project earned Adrit his Jetson AI Specialist certificate. We are keeping our appreciative (and healthy) eyes peeled out to see what he builds next. If you’re interested in building your own Blinkr, he has shared the instructions and the code here.

Categories
Misc

Dive into the Future of Graphics with NVIDIA Omniverse On-Demand Sessions

NVIDIA Omniverse is bringing the new standard in real-time graphics for developers. Check out some of the resources on the NVIDIA On-Demand catalog to learn more tips and tricks for developing in Omniverse.

NVIDIA Omniverse is bringing the new standard in real-time graphics for developers. Teams across industries are now using the open, cloud-native platform to deliver new levels of virtual collaboration and photorealistic simulation to their projects. And with open beta availability recently announced, more developers around the world can experience Omniverse and explore ways to integrate technologies or connect applications. 

Check out some of the resources on the NVIDIA On-Demand catalog to learn more tips and tricks for developing in Omniverse:

Getting Started with Omniverse Launcher: Learn more about the Omniverse Launcher as this session covers installation and configuration, as well as an overview of how to install applications and connectors. 

Omniverse Create Overview: Learn how Omniverse Create accelerates advanced scene composition and allows users to assemble, light, simulate, and render complex USD scenes in real time.

Omniverse View Overview:This session is an introduction to Omniverse View, an application created specifically  for architecture, engineering, and design professionals.

What Makes USD Unique: USD is the backbone of the Omniverse collaboration technology; in this video we discuss Pixar’s USD file format, explains the basics of its structure, and introduces layers, references and sublayers.

Omniverse Five Things to Know About Materials: This talk shows users where to find and how to interact with materials in Omniverse Create, how to create and import your own MDL materials, and how to convert materials into Omniverse.

Intro to Omniverse Unreal Engine 4 Connector: Get a brief introduction into the Omniverse Unreal Engine 4 (UE4) Connector, which consists of two plugins — a USD and an MDL plugin. This connector lets creators live link Omniverse Applications (like View and Create) with UE4.

Deep Dive into Omniverse Kit: Get an introduction to Omniverse Kit and learn how developers can leverage this powerful toolkit to create new Omniverse Apps and extensions.

Download Omniverse today and check out other Omniverse sessions on the NVIDIA On-Demand portal.

Categories
Misc

NVIDIA Expands vGPU Software to Accelerate Workstations, AI Compute Workloads

Designers, engineers, researchers, creative professionals all need the flexibility to run complex workflows – no matter where they’re working from. With the newest release of NVIDIA virtual GPU (vGPU) technology, enterprises can provide their employees with more power and flexibility through GPU-accelerated virtual machines from the data center or cloud. Available now, the latest version Read article >

The post NVIDIA Expands vGPU Software to Accelerate Workstations, AI Compute Workloads appeared first on The Official NVIDIA Blog.

Categories
Offsites

Addressing Range Anxiety with Smart Electric Vehicle Routing

Mapping algorithms used for navigation often rely on Dijkstra’s algorithm, a fundamental textbook solution for finding shortest paths in graphs. Dijkstra’s algorithm is simple and elegant — rather than considering all possible routes (an exponential number) it iteratively improves an initial solution, and works in polynomial time. The original algorithm and practical extensions of it (such as the A* algorithm) are used millions of times per day for routing vehicles on the global road network. However, due to the fact that most vehicles are gas-powered, these algorithms ignore refueling considerations because a) gas stations are usually available everywhere at the cost of a small detour, and b) the time needed to refuel is typically only a few minutes and is negligible compared to the total travel time.

This situation is different for electric vehicles (EVs). First, EV charging stations are not as commonly available as gas stations, which can cause range anxiety, the fear that the car will run out of power before reaching a charging station. This concern is common enough that it is considered one of the barriers to the widespread adoption of EVs. Second, charging an EV’s battery is a more decision-demanding task, because the charging time can be a significant fraction of the total travel time and can vary widely by station, vehicle model, and battery level. In addition, the charging time is non-linear — e.g., it takes longer to charge a battery from 90% to 100% than from 20% to 30%.

The EV can only travel a distance up to the illustrated range before needing to recharge. Different roads and different stations have different time costs. The goal is to optimize for the total trip time.

Today, we present a new approach for routing of EVs integrated into the latest release of Google Maps built into your car for participating EVs that reduces range anxiety by integrating recharging stations into the navigational route. Based on the battery level and the destination, Maps will recommend the charging stops and the corresponding charging levels that will minimize the total duration of the trip. To accomplish this we engineered a highly scalable solution for recommending efficient routes through charging stations, which optimizes the sum of the driving time and the charging time together.

The fastest route from Berlin to Paris for a gas fueled car is shown in the top figure. The middle figure shows the optimal route for a 400 km range EV (travel time indicated – charging time excluded), where the larger white circles along the route indicate charging stops. The bottom figure shows the optimal route for a 200 km range EV.

Routing Through Charging Stations
A fundamental constraint on route selection is that the distance between recharging stops cannot be higher than what the vehicle can reach on a full charge. Consequently, the route selection model emphasizes the graph of charging stations, as opposed to the graph of road segments of the road network, where each charging station is a node and each trip between charging stations is an edge. Taking into consideration the various characteristics of each EV (such as the weight, maximum battery level, plug type, etc.) the algorithm identifies which of the edges are feasible for the EV under consideration and which are not. Once the routing request comes in, Maps EV routing augments the feasible graph with two new nodes, the origin and the destination, and with multiple new (feasible) edges that outline the potential trips from the origin to its nearby charging stations and to the destination from each of its nearby charging stations.

Routing using Dijkstra’s algorithm or A* on this graph is sufficient to give a feasible solution that optimizes for the travel time for drivers that do not care at all about the charging time, (i.e., drivers who always fully charge their batteries at each charging station). However, such algorithms are not sufficient to account for charging times. In this case, the algorithm constructs a new graph by replicating each charging station node multiple times. Half of the copies correspond to entering the station with a partially charged battery, with a charge, x, ranging from 0%-100%. The other half correspond to exiting the station with a fractional charge, y (again from 0%-100%). We add an edge from the entry node at the charge x to the exit node at charge y (constrained by y > x), with a corresponding charging time to get from x to y. When the trip from Station A to Station B spends some fraction (z) of the battery charge, we introduce an edge between every exit node of Station A to the corresponding entry node of Station B (at charge xz). After performing this transformation, using Dijkstra or A* recovers the solution.

An example of our node/edge replication. In this instance the algorithm opts to pass through the first station without charging and charges at the second station from 20% to 80% battery.

Graph Sparsification
To perform the above operations while addressing range anxiety with confidence, the algorithm must compute the battery consumption of each trip between stations with good precision. For this reason, Maps maintains detailed information about the road characteristics along the trip between any two stations (e.g., the length, elevation, and slope, for each segment of the trip), taking into consideration the properties of each type of EV.

Due to the volume of information required for each segment, maintaining a large number of edges can become a memory intensive task. While this is not a problem for areas where EV charging stations are sparse, there exist locations in the world (such as Northern Europe) where the density of stations is very high. In such locations, adding an edge for every pair of stations between which an EV can travel quickly grows to billions of possible edges.

The figure on the left illustrates the high density of charging stations in Northern Europe. Different colors correspond to different plug types. The figure on the right illustrates why the routing graph scales up very quickly in size as the density of stations increases. When there are many stations within range of each other, the induced routing graph is a complete graph that stores detailed information for each edge.

However, this high density implies that a trip between two stations that are relatively far apart will undoubtedly pass through multiple other stations. In this case, maintaining information about the long edge is redundant, making it possible to simply add the smaller edges (spanners) in the graph, resulting in sparser, more computationally feasible, graphs.

The spanner construction algorithm is a direct generalization of the greedy geometric spanner. The trips between charging stations are sorted from fastest to slowest and are processed in that order. For each trip between points a and b, the algorithm examines whether smaller subtrips already included in the spanner subsume the direct trip. To do so it compares the trip time and battery consumption that can be achieved using subtrips already in the spanner, against the same quantities for the direct ab route. If they are found to be within a tiny error threshold, the direct trip from a to b is not added to the spanner, otherwise it is. Applying this sparsification algorithm has a notable impact and allows the graph to be served efficiently in responding to users’ routing requests.

On the left is the original road network (EV stations in light red). The station graph in the middle has edges for all feasible trips between stations. The sparse graph on the right maintains the distances with much fewer edges.

Summary
In this work we engineer a scalable solution for routing EVs on long trips to include access to charging stations through the use of graph sparsification and novel framing of standard routing algorithms. We are excited to put algorithmic ideas and techniques in the hands of Maps users and look forward to serving stress-free routes for EV drivers across the globe!

Acknowledgements
We thank our collaborators Dixie Wang, Xin Wei Chow, Navin Gunatillaka, Stephen Broadfoot, Alex Donaldson, and Ivan Kuznetsov.