https://github.com/GPflow/GPflow
Revision 1851e0d03aeb50009765fbc73ddb281dc12f70c9 authored by st-- on 27 June 2018, 11:19:26 UTC, committed by Mark van der Wilk on 27 June 2018, 11:19:26 UTC
* add @markvdw's stochastic likelihood, including the softmax

* initial MC likelihood

* remove MonteCarloLikelihood base class from tests

* fix test

* var of predict_mean_and_var and predict_density for MC likelihood

* factor out MC sampling

* add comment for variance bias

* add tests

* fixes

* use same integration as for GH quadrature in MonteCarloLikelihood.predict_mean_and_var()

* .

* increase rtol

* move to proper use of super()

* move MC integration to quadrature module, similar to ndiagquad

* seed to make test deterministic

* add Assert for shape of Y

* tidy up studentT likelihood

* fix for heteroskedastic likelihoods -- requires logp to always call the Y argument Y

* fix doc

* add assert and equivalence tests for SoftMax

* remove erroneously added file

* rename "probit" to inv_probit (which is what it actually is)

* add assert for num_classes to SoftMax

* fix whitespace

* Update RELEASE.md

* Update RELEASE.md
1 parent 1b0f4b0
Raw File
Tip revision: 1851e0d03aeb50009765fbc73ddb281dc12f70c9 authored by st-- on 27 June 2018, 11:19:26 UTC
Monte-Carlo likelihoods (#799)
Tip revision: 1851e0d
run_tests.sh
#!/bin/bash

# Script for running GPflow tests in sequential and parallel modes.
# Running tensorflow based tests in distinct processes prevents
# bad memory accumulations which can lead to crashes or slow runs
# on resource limited hardware.
# Written by Artem Artemev, 06/08/2017

set -e

mode=${1:-"--sequential"}

case "$mode" in
    -p|--parallel)
    numproc=$([[ $(uname) == 'Darwin' ]] && sysctl -n hw.physicalcpu_max || nproc)
    echo ">>> Parallel mode. Number of processes = $numproc"
    echo testing/test_*.py | xargs -n 1 -P "$numproc" bash -c 'nosetests -v --nologcapture $0 || exit 255'
    ;;
    -s|--sequential)
    for test_file in testing/test_*.py; do
      echo ">>> Run $test_file"
      nosetests -v --nologcapture "$test_file"
      rc=$?
      if [ "$rc" != "0" ]; then
        echo ">>> $test_file failed"
        exit $rc
      fi
    done
    ;;
    *)
    ;;
esac
back to top