This file contains 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
#!/bin/bash | |
if [ "$(uname)" == "Darwin" ]; then | |
# This is a Mac, so use Homebrew | |
echo "Installing jq with Homebrew..." | |
brew install jq | |
else | |
# Assume this is a Linux system and use apt-get | |
echo "Installing jq with apt-get..." | |
sudo apt-get update |
This file contains 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
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false | |
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM | |
gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode FIXED | |
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 64 | |
gsettings set org.gnome.shell.extensions.dash-to-dock unity-backlit-items true |
This file contains 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 pad_nulls(arraylike, seq_len, input_size): | |
''' | |
Pad nulls to the end of the arraylike, so that the length of the arraylike | |
is divisible by the batch_size. | |
''' | |
if len(arraylike)==0: | |
arraylike = np.zeros( (seq_len, input_size), dtype=np.float32) | |
remainder = len(arraylike) % seq_len | |
if remainder != 0: |
This file contains 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
initializer=keras.initializers.he_uniform | |
#@title Encoder | |
def create_encoder(input_shape): | |
inputs = keras.layers.Input(shape=input_shape) | |
x = keras.layers.Conv1D(filters=HIDDEN_SIZE, | |
kernel_size=4, | |
strides=1, | |
input_shape=input_shape, | |
kernel_initializer=initializer, |
This file contains 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
class GenModel(nn.Module): | |
def _init_weights(self, module): | |
if module.state_dict().get('weight') != None: | |
if type(module) == nn.BatchNorm1d: | |
nn.init.zeros_(module.bias) | |
else: | |
nn.init.kaiming_uniform_(module.weight) | |
def __init__(self, input_size, hidden_size, num_layers, bidirectional): | |
super().__init__() |
This file contains 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
class GenModel(nn.Module): | |
def _init_weights(self, module): | |
if module.state_dict().get('weight') != None: | |
if type(module) == nn.BatchNorm1d: | |
nn.init.zeros_(module.bias) | |
else: | |
nn.init.kaiming_uniform_(module.weight) | |
def __init__(self, input_size, hidden_size, num_layers, bidirectional): | |
super().__init__() |
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.
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