Skip to content

Instantly share code, notes, and snippets.

@Arkoniak
Arkoniak / mxnet_loss_logreg.jl
Created December 29, 2016 12:35
Julia MXNet custom loss function, logistic regression
using MXNet
import MXNet.mx: _update_single_output, reset!, get
using Distributions
# This example based on
# http://deeplearning.net/software/theano/tutorial/examples.html#a-real-example-logistic-regression
#####################################
# Custom evaluation metric
@Arkoniak
Arkoniak / mxnet_loss_linear.jl
Last active January 17, 2017 11:47
Custom loss function in Julia MXNet, linear regression
using MXNet
import MXNet.mx: _update_single_output, reset!, get
using Distributions
#####################################
# Custom evaluation metric
# It just summarize predictions, because in the case of custom
# loss layer, ANN output equals to loss function itself