timrudner / s-fsvi Goto Github PK
View Code? Open in Web Editor NEWCode for the paper 'Continual Learning via Sequential Function-Space Variational Inference'
Home Page: https://timrudner.com/sfsvi
License: MIT License
Code for the paper 'Continual Learning via Sequential Function-Space Variational Inference'
Home Page: https://timrudner.com/sfsvi
License: MIT License
Hi,
Thanks for your work and to have made your code publicly available!
I want to reproduce some of your experiments, but I'm having problems setting up the environment. I followed the installation instructions in the README and then following the code in the notebook split_mnist_singlehead.ipynb
, I wrote this simple script to run the same experiment using S-FSVI:
import os
import sys
import sfsvi.exps.utils.load_utils as lutils
from notebooks.nb_utils.common import read_config_and_run, show_final_average_accuracy
root = os.path.abspath(os.path.join(os.getcwd(), ".."))
if root not in sys.path:
sys.path.insert(0, root)
task_sequence = "smnist_sh"
config_path = 'notebooks/configs'
logdir = read_config_and_run(os.path.join(config_path, "fsvi_match.pkl"),
task_sequence)
exp = lutils.read_exp(logdir)
show_final_average_accuracy(exp)
Running this code snippet I get these warnings/errors:
/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/tensorflow_probability/python/__init__.py:69: UserWarning: TensorFloat-32 matmul/conv are enabled for NVIDIA Ampere+ GPUs. The resulting loss of precision may hinder MCMC convergence. To turn off, run `tf.config.experimental.enable_tensor_float_32_execution(False)`. For more detail, see https://github.com/tensorflow/community/pull/287.
'TensorFloat-32 matmul/conv are enabled for NVIDIA Ampere+ GPUs. The '
/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/tensorflow_probability/python/__init__.py:69: UserWarning: TensorFloat-32 matmul/conv are enabled for NVIDIA Ampere+ GPUs. The resulting loss of precision may hinder MCMC convergence. To turn off, run `tf.config.experimental.enable_tensor_float_32_execution(False)`. For more detail, see https://github.com/tensorflow/community/pull/287.
'TensorFloat-32 matmul/conv are enabled for NVIDIA Ampere+ GPUs. The '
/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/tensorflow_probability/python/__init__.py:69: UserWarning: TensorFloat-32 matmul/conv are enabled for NVIDIA Ampere+ GPUs. The resulting loss of precision may hinder MCMC convergence. To turn off, run `tf.config.experimental.enable_tensor_float_32_execution(False)`. For more detail, see https://github.com/tensorflow/community/pull/287.
'TensorFloat-32 matmul/conv are enabled for NVIDIA Ampere+ GPUs. The '
/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/tensorflow_addons/utils/ensure_tf_install.py:67: UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.3.0 and strictly below 2.6.0 (nightly versions are not supported).
The versions of TensorFlow you are currently using is 2.6.5 and is not supported.
Some things might work, some things might not.
If you were to encounter a bug, do not file an issue.
If you want to make sure you're using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons's version.
You can find the compatibility matrix in TensorFlow Addon's readme:
https://github.com/tensorflow/addons
UserWarning,
Traceback (most recent call last):
File "/home/usr/workspace/S-FSVI/main.py", line 8, in <module>
from notebooks.nb_utils.common import read_config_and_run, show_final_average_accuracy
File "/home/usr/workspace/S-FSVI/notebooks/nb_utils/common.py", line 39, in <module>
from cli import run_config
File "/home/usr/workspace/S-FSVI/cli.py", line 20, in <module>
from sfsvi.run import run as cl_run
File "/home/usr/workspace/S-FSVI/sfsvi/run.py", line 23, in <module>
from benchmarking.method_cl_fsvi import MethodCLFSVI
File "/home/usr/workspace/S-FSVI/benchmarking/method_cl_fsvi.py", line 17, in <module>
import optax
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/optax/__init__.py", line 18, in <module>
from optax._src.alias import adabelief
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/optax/_src/alias.py", line 18, in <module>
from optax._src import combine
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/optax/_src/combine.py", line 18, in <module>
from optax._src import transform
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/optax/_src/transform.py", line 19, in <module>
import chex
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/chex/__init__.py", line 17, in <module>
from chex._src.asserts import assert_axis_dimension
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/chex/_src/asserts.py", line 26, in <module>
from chex._src import asserts_internal as _ai
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/chex/_src/asserts_internal.py", line 34, in <module>
from chex._src import pytypes
File "/home/usr/miniconda3/envs/fsvi/lib/python3.7/site-packages/chex/_src/pytypes.py", line 36, in <module>
PRNGKey = jax.random.KeyArray
AttributeError: module 'jax.random' has no attribute 'KeyArray'
Do you know how I can fix this problem?
Thanks
Hi Tim,
Thanks for sharing the code - look forward to using it. Just checking if the vcl code under baselines/vcl is the same as in this repo? If yes, perhaps baselines/vcl should be a git submodule, or it should include an ack and link to the original repo.
Cheers,
Thang
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.