Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| from __future__ import division | |
| from random import random | |
| import numpy as np | |
| import pandas as pd | |
| ''' | |
| Use regret-matching algorithm to play Scissors-Rock-Paper. | |
| ''' | |
| class RPS: |
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
| from __future__ import division | |
| from random import random | |
| import numpy as np | |
| import pandas as pd | |
| ''' | |
| Use regret-matching algorithm to play Scissors-Rock-Paper. | |
| ''' | |
| class RPS: |
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
| # git clone from https://github.com/tkarras/progressive_growing_of_gans | |
| # download the snapshot from their Google drive | |
| # use the following code in the same directory to generate random faces | |
| import os | |
| import sys | |
| import time | |
| import glob | |
| import shutil | |
| import operator | |
| import theano |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| import torch | |
| from torch import nn | |
| from torch.autograd import Variable | |
| class AdaptiveSoftmax(nn.Module): | |
| def __init__(self, input_size, cutoff): | |
| super().__init__() | |
| self.input_size = input_size | |
| self.cutoff = cutoff |
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
| ''' | |
| Non-parametric computation of entropy and mutual-information | |
| Adapted by G Varoquaux for code created by R Brette, itself | |
| from several papers (see in the code). | |
| These computations rely on nearest-neighbor statistics | |
| ''' | |
| import numpy as np |