Skip to content

Instantly share code, notes, and snippets.

View Seanny123's full-sized avatar
💭
>.<

Sean Aubin Seanny123

💭
>.<
View GitHub Profile
@Seanny123
Seanny123 / mask_example.py
Last active May 29, 2017 08:49 — forked from ragulpr/py
Keras masking example
from keras.layers import Masking, Dense
from keras.layers.recurrent import LSTM
from keras.models import Sequential
import numpy as np
np.set_printoptions(precision=4)
np.random.seed(1)
from keras.layers import Input, Masking, LSTM, Dense
from keras.models import Model
import numpy as np
# Case1: model with return_sequences=True (output_shape = (1,10,1) )
##############################################################
input1 = Input(batch_shape=(1, 10, 16))
mask1 = Masking(mask_value=2.)(input1)
lstm1 = LSTM(16, return_sequences=True)(mask1)
dense_layer = Dense(1, activation='sigmoid')
@Seanny123
Seanny123 / create_points.py
Created November 23, 2018 17:41 — forked from zsunberg/create_points.py
PyJulia Example Use Case
import numpy as np
r = np.arange(1.0, 11.0, 0.1)
n = len(r)**3
pts = np.empty((n, 3))
i = 0
for x in r:
for y in r:
for z in r: