duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| class MultiInputProcessor(Processor): | |
| """Converts observations from an environment with multiple observations for use in a neural network | |
| policy. | |
| In some cases, you have environments that return multiple different observations per timestep | |
| (in a robotics context, for example, a camera may be used to view the scene and a joint encoder may | |
| be used to report the angles for each joint). Usually, this can be handled by a policy that has | |
| multiple inputs, one for each modality. However, observations are returned by the environment | |
| in the form of a tuple `[(modality1_t, modality2_t, ..., modalityn_t) for t in T]` but the neural network | |
| expects them in per-modality batches like so: `[[modality1_1, ..., modality1_T], ..., [[modalityn_1, ..., modalityn_T]]`. |
| """ | |
| Clean and simple Keras implementation of network architectures described in: | |
| - (ResNet-50) [Deep Residual Learning for Image Recognition](https://arxiv.org/pdf/1512.03385.pdf). | |
| - (ResNeXt-50 32x4d) [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/pdf/1611.05431.pdf). | |
| Python 3. | |
| """ | |
| from keras import layers | |
| from keras import models |
| """ Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
| import numpy as np | |
| import cPickle as pickle | |
| import gym | |
| # hyperparameters | |
| H = 200 # number of hidden layer neurons | |
| batch_size = 10 # every how many episodes to do a param update? | |
| learning_rate = 1e-4 | |
| gamma = 0.99 # discount factor for reward |
| #!/usr/bin/env python | |
| from Foundation import NSUserNotification | |
| from Foundation import NSUserNotificationCenter | |
| from Foundation import NSUserNotificationDefaultSoundName | |
| from optparse import OptionParser | |
| def main(): | |
| parser = OptionParser(usage='%prog -t TITLE -m MESSAGE') |