February 2018
Intermediate to advanced
218 pages
5h 31m
English
As discussed in the earlier section, the Glimpse Sensor is a powerful concept. Combined with other concepts, such as RNN and RL, as discussed earlier, it is at the heart of improving the performance of visual models.
Let's see this in greater detail here. The code is commented at every line for easy understanding and is self-explanatory:
import tensorflow as tf# the code is in tensorflowimport numpy as npdef glimpseSensor(image, fixationLocation): ''' Glimpse Sensor for Recurrent Attention Model (RAM) :param image: the image xt :type image: numpy vector :param fixationLocation: cordinates l for fixation center :type fixationLocation: tuple :return: Multi Resolution Representations from Glimpse Sensor :rtype: ''' img_size=np.asarray(image).shape[: ...
Read now
Unlock full access