Last active
November 9, 2021 15:48
-
-
Save gallettilance/f55df6f6de460ddce86b9e5b51023647 to your computer and use it in GitHub Desktop.
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
from tensorflow import keras | |
def custom_act(x): | |
return x**2 | |
model = keras.models.Sequential() | |
model.add(keras.layers.Dense(1, input_dim=1, use_bias=False, activation=custom_act)) | |
model.add(keras.layers.Dense(1)) | |
model.compile(loss="mean_squared_error") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment