This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def add_accelerate_options(): | |
| """Create Click options from accelerate's launch command arguments.""" | |
| def decorator(function): | |
| parser = launch_command_parser() | |
| # Process each argument group in reverse order for correct option ordering | |
| for group in reversed(parser._action_groups): | |
| if group.title in ['positional arguments', 'optional arguments']: | |
| continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import scipy.stats | |
| import numpy as np | |
| import matplotlib.cm as cm | |
| import matplotlib.pyplot as plt | |
| from tqdm import tqdm | |
| from matplotlib.patches import Ellipse | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| PyTorch tutorial code found at http://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html#sphx-glr-intermediate-reinforcement-q-learning-py. | |
| ''' | |
| import gym | |
| import math | |
| import random | |
| import numpy as np | |
| import matplotlib | |
| import matplotlib.pyplot as plt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| # imports | |
| from tensorflow.examples.tutorials.mnist import input_data | |
| import tensorflow as tf | |
| # download and store MNIST data | |
| mnist = input_data.read_data_sets('MNIST_data', one_hot=True) | |
| # create TensorFlow interactive session |