git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
## 2010-06-25 | |
## (c) Felix Andrews <felix@nfrac.org> | |
## GPL-2 | |
## If 'which' is given it should be a logical matrix specifying bold cells. | |
## Otherwise: in each column or row with numeric data, the maximum or minimum | |
## value is set bold; 'max' can have entries for each column/row, NA means skip. | |
## Examples: | |
## library(xtable) |
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
Translations: (No guarantee that the translations are up-to-date)
""" 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 |
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
import warnings | |
warnings.filterwarnings('ignore') | |
import torch_xla | |
import torch_xla.distributed.data_parallel as dp | |
import torch_xla.utils.utils as xu | |
import torch_xla.core.xla_model as xm | |
import torch_xla.distributed.parallel_loader as pl | |
import torch_xla.distributed.xla_multiprocessing as xmp | |
import torch |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
class AsymmetricLoss(nn.Module): | |
def __init__( | |
self, | |
gamma_neg: float = 4.0, | |
gamma_pos: float = 1.0, |