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
## Unity ## | |
*.cs diff=csharp text | |
*.cginc text | |
*.shader text | |
*.mat merge=unityyamlmerge eol=lf | |
*.anim merge=unityyamlmerge eol=lf | |
*.unity merge=unityyamlmerge eol=lf | |
*.prefab merge=unityyamlmerge eol=lf |
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
function trigger(el, eventType) { | |
if (typeof eventType === 'string' && typeof el[eventType] === 'function') { | |
el[eventType](); | |
} else { | |
const event = | |
eventType === 'string' | |
? new Event(eventType, {bubbles: true}) | |
: eventType; | |
el.dispatchEvent(event); | |
} |
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
alizarin | |
amaranth | |
amber | |
amethyst | |
apricot | |
aqua | |
aquamarine | |
asparagus | |
auburn | |
azure |
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
alizarin | |
amaranth | |
amber | |
amethyst | |
apricot | |
aqua | |
aquamarine | |
asparagus | |
auburn | |
azure |
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
# Show Tensor Images utility function | |
from torchvision.utils import make_grid | |
import matplotlib.pyplot as plt | |
def show_tensor_images(image_tensor, num_images=25, size=(1, 28, 28)): | |
''' | |
Function for visualizing images: Given a tensor of images, number of images, and | |
size per image, plots and prints the images in a uniform grid. | |
''' |
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 conv_backward(dH, cache): | |
''' | |
The backward computation for a convolution function | |
Arguments: | |
dH -- gradient of the cost with respect to output of the conv layer (H), numpy array of shape (n_H, n_W) assuming channels = 1 | |
cache -- cache of values needed for the conv_backward(), output of conv_forward() | |
Returns: | |
dX -- gradient of the cost with respect to input of the conv layer (X), numpy array of shape (n_H_prev, n_W_prev) assuming channels = 1 |
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 conv_forward(X, W): | |
''' | |
The forward computation for a convolution function | |
Arguments: | |
X -- output activations of the previous layer, numpy array of shape (n_H_prev, n_W_prev) assuming input channels = 1 | |
W -- Weights, numpy array of size (f, f) assuming number of filters = 1 | |
Returns: | |
H -- conv output, numpy array of size (n_H, n_W) |
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 conv_forward(X, W): | |
''' | |
The forward computation for a convolution function | |
Arguments: | |
X -- output activations of the previous layer, numpy array of shape (n_H_prev, n_W_prev) assuming input channels = 1 | |
W -- Weights, numpy array of size (f, f) assuming number of filters = 1 | |
Returns: | |
H -- conv output, numpy array of size (n_H, n_W) |
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.
NewerOlder