A clean installation of Ubuntu 18.04.02 LTS was used.
This gist is an extension to the official docs, adding missing parts and instructions.
follow the pre-installation actions on:
# Copyright 2022 DeepMind Technologies Limited. | |
# Licensed under the Apache License, Version 2.0 and CC BY 4.0. | |
# You may not use this file except in compliance with these licenses. | |
# Copies of the licenses can be found at https://www.apache.org/licenses/LICENSE-2.0 | |
# and https://creativecommons.org/licenses/by/4.0/legalcode. | |
"""Pseudocode description of the Stochastic MuZero algorithm. | |
This pseudocode was adapted from the original MuZero pseudocode. | |
""" |
import jax.numpy as jnp | |
from jax import random | |
class JaxCartPole: | |
""" | |
Based on OpenAI Gym Cartpole | |
https://github.com/openai/gym/blob/master/gym/envs/classic_control/cartpole.py | |
""" | |
def __init__(self): | |
self.gravity = 9.8 |
def init_weights(m, variance=1.0): | |
def _calculate_fan_in_and_fan_out(tensor): | |
dimensions = tensor.dim() | |
if dimensions < 2: | |
return 1, 1 | |
if dimensions == 2: # Linear | |
fan_in = tensor.size(1) | |
fan_out = tensor.size(0) |
A clean installation of Ubuntu 18.04.02 LTS was used.
This gist is an extension to the official docs, adding missing parts and instructions.
follow the pre-installation actions on:
import os | |
import sys | |
import shutil | |
import multiprocessing as mp | |
from itertools import repeat as re | |
import dateparser | |
import pytz | |
import json | |
import csv | |
import datetime |
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |
#!/bin/bash | |
### steps #### | |
# Verify the system has a cuda-capable gpu | |
# Download and install the nvidia cuda toolkit and cudnn | |
# Setup environmental variables | |
# Verify the installation | |
### | |
### to verify your gpu is cuda enable check |