Skip to content

Instantly share code, notes, and snippets.

@cgarciae
Created August 28, 2020 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgarciae/97d2e21f62d0dcf498fac57134ddbc65 to your computer and use it in GitHub Desktop.
Save cgarciae/97d2e21f62d0dcf498fac57134ddbc65 to your computer and use it in GitHub Desktop.
Fit
model = elegy.Model(
module=MixtureModel(k=k),
loss=MixtureNLL(),
optimizer=optax.adam(3e-4),
)
model.summary(X_train[:batch_size], depth=1)
model.fit(
x=X_train,
y=y_train,
epochs=500,
batch_size=batch_size,
shuffle=True,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment