The Basque Association

of Language Industries

Document Actions

RSS feeds

Nov 15, 2017 SLING: A Natural Language Frame Semantic Parser
Posted by Michael Ringgaard, Software Engineer and Rahul Gupta, Research Scientist Until recently, most practical natural language understanding (NLU) systems used a pipeline of analysis stages, from part-of-speech tagging and dependency parsing to steps that computed a semantic representation of the input text. While this facilitated easy modularization of different analysis stages, errors in earlier stages would have cascading effects in later stages and the final representation, and the intermediate stage outputs ...
Nov 14, 2017 On-Device Conversational Modeling with TensorFlow Lite
Posted by Sujith Ravi, Research Scientist, Google Expander Team Earlier this year, we launched Android Wear 2.0 which featured the first "on-device" machine learning technology for smart messaging. This enabled cloud-based technologies like Smart Reply, previously available in Gmail , Inbox and Allo , to be used directly within any application for the first time, including third-party messaging apps, without ever having to connect to the cloud.
Nov 13, 2017 Fused Video Stabilization on the Pixel 2 and Pixel 2 XL
Posted by Chia-Kai Liang, Senior Staff Software Engineer and Fuhao Shi, Android Camera Team One of the most important aspects of current smartphones is easily capturing and sharing videos. With the Pixel 2 and Pixel 2 XL smartphones, the videos you capture are smoother and clearer than ever before, thanks to our Fused Video Stabilization technique based on both optical image stabilization (OIS) and electronic image stabilization (EIS).
Nov 09, 2017 Seamless Google Street View Panoramas
Posted by Mike Krainin, Software Engineer and Ce Liu, Research Scientist, Machine Perception In 2007, we introduced Google Street View , enabling you to explore the world through panoramas of neighborhoods, landmarks, museums and more, right from your browser or mobile device. The creation of these panoramas is a complicated process, involving capturing images from a multi-camera rig called a rosette, and then using image blending techniques to carefully stitch them all ...
Nov 07, 2017 Feature Visualization
Posted by Christopher Olah, Research Scientist, Google Brain Team and Alex Mordvintsev, Research Scientist, Google Research Have you ever wondered what goes on inside neural networks? Feature visualization is a powerful tool for digging into neural networks and seeing how they work. Our new article , published in Distill , does a deep exploration of feature visualization, introducing a few new tricks along the way! Building on our work in DeepDream , ...
Nov 07, 2017 Latest Innovations in TensorFlow Serving
Posted by Chris Olston, Research Scientist, and Noah Fiedel, Software Engineer, TensorFlow Serving Since initially open-sourcing TensorFlow Serving in February 2016 , we’ve made some major enhancements. Let’s take a look back at where we started, review our progress, and share where we are headed next.
Nov 06, 2017 Tangent: Source-to-Source Debuggable Derivatives
Posted by Alex Wiltschko, Research Scientist, Google Brain Team Tangent is a new, free, and open-source Python library for automatic differentiation. In contrast to existing machine learning libraries, Tangent is a source-to-source system, consuming a Python function f and emitting a new Python function that computes the gradient of f .
Nov 06, 2017 AutoML for large scale image classification and object detection
Posted by Barret Zoph, Vijay Vasudevan, Jonathon Shlens and Quoc Le, Research Scientists, Google Brain Team A few months ago, we introduced our AutoML project, an approach that automates the design of machine learning models. While we found that AutoML can design small neural networks that perform on par with neural networks designed by human experts, these results were constrained to small academic datasets like CIFAR-10, and Penn Treebank.
Nov 06, 2017 Closing the Simulation-to-Reality Gap for Deep Robotic Learning
Posted by Konstantinos Bousmalis, Senior Research Scientist, and Sergey Levine, Faculty Advisor, Google Brain Team Each of us can learn remarkably complex skills that far exceed the proficiency and robustness of even the most sophisticated robots, when it comes to basic sensorimotor skills like grasping. However, we also draw on a lifetime of experience, learning over the course of multiple years how to interact with the world around us.
Oct 31, 2017 Eager Execution: An imperative, define-by-run interface to TensorFlow
Posted by Asim Shankar and Wolff Dobson, Google Brain Team Today, we introduce eager execution for TensorFlow. Eager execution is an imperative, define-by-run interface where operations are executed immediately as they are called from Python. This makes it easier to get started with TensorFlow, and can make research and development more intuitive. The benefits of eager execution include: Fast debugging with immediate run-time errors and integration with Python tools Support for dynamic models using easy-to-use Python control flow Strong support for custom and higher-order gradients Almost all of the available TensorFlow operations Eager execution is available now as an experimental feature, so we're looking for feedback from the community to guide our direction. To understand this all better, let's look at some code. This gets pretty technical; familiarity with TensorFlow will help. Using Eager Execution When you enable eager execution, operations execute immediately and return their values to Python without requiring a . For example, to multiply two matrices together, we write this: import tensorflow as tf import tensorflow.contrib.eager as tfe tfe.enable_eager_execution() x = [[2.]] m = tf.matmul(x, x) It’s straightforward to inspect intermediate results with print or the Python debugger. print(m) # The 1x1 matrix [[4.]] Dynamic models can be built with Python flow control. Here's an example of the Collatz conjecture using TensorFlow’s arithmetic operations: a = tf.constant(12) counter = 0 while not tf.equal(a, 1): if tf.equal(a % 2, 0): a = a / 2 else: a = 3 * a + 1 print(a) Here, the use of the tf.constant(12) Tensor object will promote all math operations to tensor operations, and as such all return values with be tensors. Gradients Most TensorFlow users are interested in automatic differentiation. Because different operations can occur during each call, we record all forward operations to a tape, which is then played backwards when computing gradients. After we've computed the gradients, we discard the tape. If you’re familiar with the autograd package, the API is very similar. For example: def square(x): return tf.multiply(x, x) grad = tfe.gradients_function(square) print(square(3.)) # [9.] print(grad(3.)) # [6.] The gradients_function call takes a Python function square() as an argument and returns a Python callable that computes the partial derivatives of square() with respect to its inputs. So, to get the derivative of square() at 3.0, invoke grad(3.0) , which is 6. The same gradients_function call can be used to get the second derivative of square: gradgrad = tfe.gradients_function(lambda x: grad(x)[0]) print(gradgrad(3.)) # [2.] As we noted, control flow can cause different operations to run, such as in this example. def abs(x): return x if x > 0. else -x grad = tfe.gradients_function(abs) print(grad(2.0)) # [1.] print(grad(-2.0)) # [-1.] Custom Gradients Users may want to define custom gradients for an operation, or for a function. This may be useful for multiple reasons, including providing a more efficient or more numerically stable gradient for a sequence of operations. Here is an example that illustrates the use of custom gradients. Let's start by looking at the function log(1 + e x ), which commonly occurs in the computation of cross entropy and log likelihoods. def log1pexp(x): return tf.log(1 + tf.exp(x)) grad_log1pexp = tfe.gradients_function(log1pexp) # The gradient computation works fine at x = 0. print(grad_log1pexp(0.)) # [0.5] # However it returns a `nan` at x = 100 due to numerical instability. print(grad_log1pexp(100.)) # [nan] We can use a custom gradient for the above function that analytically simplifies the gradient expression. Notice how the gradient function implementation below reuses an expression ( tf.exp(x) ) that was computed during the forward pass, making the gradient computation more efficient by avoiding redundant computation. @tfe.custom_gradient def log1pexp(x): e = tf.exp(x) def grad(dy): return dy * (1 - 1 / (1 + e)) return tf.log(1 + e), grad grad_log1pexp = tfe.gradients_function(log1pexp) # Gradient at x = 0 works as before. print(grad_log1pexp(0.)) # [0.5] # And now gradient computation at x=100 works as well. print(grad_log1pexp(100.)) # [1.0] Building models Models can be organized in classes. Here's a model class that creates a (simple) two layer network that can classify the standard MNIST handwritten digits. class MNISTModel(tfe.Network): def __init__(self): super(MNISTModel, self).__init__() self.layer1 = self.track_layer(tf.layers.Dense(units=10)) self.layer2 = self.track_layer(tf.layers.Dense(units=10)) def call(self, input): """Actually runs the model.""" result = self.layer1(input) result = self.layer2(result) return result We recommend using the classes (not the functions) in tf.layers since they create and contain model parameters (variables). Variable lifetimes are tied to the lifetime of the layer objects, so be sure to keep track of them. Why are we using tfe.Network ? A Network is a container for layers and is a tf.layer.Layer itself, allowing Network objects to be embedded in other Network objects. It also contains utilities to assist with inspection, saving, and restoring. Even without training the model, we can imperatively call it and inspect the output: # Let's make up a blank input image model = MNISTModel() batch = tf.zeros([1, 1, 784]) print(batch.shape) # (1, 1, 784) result = model(batch) print(result) # tf.Tensor([[[ 0. 0., ...., 0.]]], shape=(1, 1, 10), dtype=float32) Note that we do not need any placeholders or sessions. The first time we pass in the input, the sizes of the layers’ parameters are set. To train any model, we define a loss function to optimize, calculate gradients, and use an optimizer to update the variables. First, here's a loss function: def loss_function(model, x, y): y_ = model(x) return tf.nn.softmax_cross_entropy_with_logits(labels=y, logits=y_) And then, our training loop: optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.001) for (x, y) in tfe.Iterator(dataset): grads = tfe.implicit_gradients(loss_function)(model, x, y) optimizer.apply_gradients(grads) implicit_gradients() calculates the derivatives of loss_function with respect to all the TensorFlow variables used during its computation. We can move computation to a GPU the same way we’ve always done with TensorFlow: with tf.device("/gpu:0"): for (x, y) in tfe.Iterator(dataset): optimizer.minimize(lambda: loss_function(model, x, y)) (Note: We're shortcutting storing our loss and directly calling the optimizer.minimize , but you could also use the apply_gradients() method above; they are equivalent.) Using Eager with Graphs Eager execution makes development and debugging far more interactive, but TensorFlow graphs have a lot of advantages with respect to distributed training, performance optimizations, and production deployment. The same code that executes operations when eager execution is enabled will construct a graph describing the computation when it is not. To convert your models to graphs, simply run the same code in a new Python session where eager execution hasn’t been enabled, as seen, for example, in the MNIST example . The value of model variables can be saved and restored from checkpoints, allowing us to move between eager (imperative) and graph (declarative) programming easily. With this, models developed with eager execution enabled can be easily exported for production deployment. In the near future, we will provide utilities to selectively convert portions of your model to graphs. In this way, you can fuse parts of your computation (such as internals of a custom RNN cell) for high-performance, but also keep the flexibility and readability of eager execution. How does my code change? Using eager execution should be intuitive to current TensorFlow users. There are only a handful of eager-specific APIs; most of the existing APIs and operations work with eager enabled. Some notes to keep in mind: As with TensorFlow generally, we recommend that if you have not yet switched from queues to using for input processing, you should. It's easier to use and usually faster. For help, see this blog post and the documentation page . Use object-oriented layers, like tf.layer.Conv2D() or Keras layers; these have explicit storage for variables. For most models, you can write code so that it will work the same for both eager execution and graph construction. There are some exceptions, such as dynamic models that use Python control flow to alter the computation based on inputs. Once you invoke tfe.enable_eager_execution() , it cannot be turned off. To get graph behavior, start a new Python session. Getting started and the future This is still a preview release, so you may hit some rough edges. To get started today: Install the nightly build of TensorFlow. Check out the README (including known issues) Get detailed instructions in the eager execution User Guide Browse the eager examples in GitHub Follow the changelog  for updates. There's a lot more to talk about with eager execution and we're excited… or, rather, we're eager for you to try it today! Feedback is absolutely welcome.
Oct 26, 2017 Announcing OpenFermion: The Open Source Chemistry Package for Quantum Computers
Posted by Ryan Babbush and Jarrod McClean, Quantum Software Engineers, Quantum AI Team “The underlying physical laws necessary for the mathematical theory of a large part of physics and the whole of chemistry are thus completely known, and the difficulty is only that the exact application of these laws leads to equations much too complicated to be soluble.” - Paul Dirac, Quantum Mechanics of Many-Electron Systems (1929) In this passage, physicist Paul ...
Oct 19, 2017 Announcing AVA: A Finely Labeled Video Dataset for Human Action Understanding
Posted by Chunhui Gu & David Ross, Software Engineers Teaching machines to understand human actions in videos is a fundamental research problem in Computer Vision, essential to applications such as personal video search and discovery, sports analysis, and gesture interfaces. Despite exciting breakthroughs made over the past years in classifying and finding objects in images, recognizing human actions still remains a big challenge.
Oct 18, 2017 Portrait mode on the Pixel 2 and Pixel 2 XL smartphones
Posted by Marc Levoy, Principal Engineer and Yael Pritch, Software Engineer Portrait mode, a major feature of the new Pixel 2 and Pixel 2 XL smartphones, allows anyone to take professional-looking shallow depth-of-field images. This feature helped both devices earn DxO's highest mobile camera ranking , and works with both the rear-facing and front-facing cameras, even though neither is dual-camera (normally required to obtain this effect).
Oct 11, 2017 TensorFlow Lattice: Flexibility Empowered by Prior Knowledge
Posted by Maya Gupta, Research Scientist, Jan Pfeifer, Software Engineer and Seungil You, Software Engineer (Cross-posted on the Google Open Source Blog ) Machine learning has made huge advances in many applications including natural language processing, computer vision and recommendation systems by capturing complex input/output relationships using highly flexible models.
Sep 13, 2017 The Google Brain Team’s Approach to Research
Posted by Jeff Dean, Google Senior Fellow About a year ago, the Google Brain team first shared our mission “Make machines intelligent. Improve people’s lives.” In that time, we’ve shared updates on our work to infuse machine learning across Google products that hundreds of millions of users access everyday, including Translate , Maps , and more.
Sep 12, 2017 Highlights from the Annual Google PhD Fellowship Summit, and Announcing the 2017 Google PhD Fellows
Posted by Susie Kim, Program Manager, University Relations In 2009, Google created the PhD Fellowship Program to recognize and support outstanding graduate students doing exceptional research in Computer Science and related disciplines. Now in its ninth year, our Fellowships have helped support over 300 graduate students in Australia , China and East Asia , India , North America, Europe and the Middle East who seek to shape and influence the future of ...
Sep 12, 2017 Google at KDD’17: Graph Mining and Beyond
Posted by Bryan Perozzi, Research Scientist, NYC Algorithms and Optimization Team The 23rd ACM conference on Knowledge Discovery and Data Mining (KDD’17), a main venue for academic and industry research in data science, information retrieval, data mining and machine learning, was held last week in Halifax, Canada.
Sep 11, 2017 Build your own Machine Learning Visualizations with the new TensorBoard API
Posted by Chi Zeng and Justine Tunney, Software Engineers, Google Brain Team When we open-sourced TensorFlow in 2015 , it included TensorBoard , a suite of visualizations for inspecting and understanding your TensorFlow models and runs. Tensorboard included a small, predetermined set of visualizations that are generic and applicable to nearly all deep learning applications such as observing how loss changes over time or exploring clusters in high-dimensional spaces .
Sep 08, 2017 Harness the Power of Machine Learning in Your Browser with Deeplearn.js
Posted by Nikhil Thorat and Daniel Smilkov, Software Engineers, Google Big Picture Team Machine learning (ML) has become an increasingly powerful tool, one that can be applied to a wide variety of areas spanning object recognition , language translation , health and more. However, the development of ML systems is often restricted to those with computational resources and the technical expertise to work with commonly available ML libraries.
Sep 06, 2017 Seminal Ideas from 2007
Posted by Anna Ukhanova, Technical Program Manager, Google Research Europe It is not everyday we have the chance to pause and think about how previous work has led to current successes, how it influenced other advances and reinterpret it in today’s context. That’s what the ICML Test-of-Time Award is meant to achieve, and this year it was given to the work Sylvain Gelly , now a researcher on the Google Brain team ...