- Download [Miniforge3-MacOSX-arm64.sh][1]
- Run the file using the following command:-
./Miniforge3-MacOSX-arm64.sh
- It will download miniforge in the current directory. Now you have to activate it. Use the following command to do so.
source miniforge3/bin/activate
- You should see
(conda)
is prepended in your command line. To make sure it is activated during terminal start-up. Use the following command.conda init
- or if you are using zsh,
conda init zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import torch | |
from torch import nn | |
import tqdm | |
def convNd(in_channels=1, out_channels=1, kernel_size=2, stride=1, padding=1, weight=None, bias=None): | |
# These are filters or kernels | |
if weight is None: | |
weight = np.ones((out_channels, in_channels, *kernel_size)) | |
# O,C,*kernel_size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# env [MDP environment] | |
# nS [state_dim] | |
# nA [action_dim] | |
# env.TransitProb [state_dim x action_dim x state_dim] | |
# env.TransitReward [state_dim x action_dim], Note: It maybe in shape [state_dim x action_dim x state_dim]. In such | |
# case no need to expand dim. It can also be in the same [state_dim], then it is required to expand dim twice accordingly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Value iteration compact | |
# env [MDP environment] | |
# nS [state_dim] | |
# env.TransitProb [state_dim x action_dim x state_dim] | |
# env.TransitReward [state_dim x action_dim], Note: It maybe in shape [state_dim x action_dim x state_dim]. In such |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
from typing import Optional, Any, Union, Callable | |
import torch | |
from torch import Tensor | |
from .. import functional as F | |
from .module import Module | |
from .activation import MultiheadAttention | |
from .container import ModuleList | |
from ..init import xavier_uniform_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. I set this on my local machine and flip | |
`alias port_map='f(){ ssh -N -L "$2":localhost:"$2" panditb@"$1".engr.oregonstate.edu; unset -f f; }; f'` | |
2. Enter into flip3 (use same node to re-establish connection to HPC if lost, eg '3' here) | |
`ssh [email protected]` | |
3. Enter HPC and whatever node thereafter (For example if you connect to cn-gpu5, hostname will be gpu5). | |
`ssh panditb@compute-{hostname}.hpc.engr.oregonstate.edu` | |
4. I start the jupyter on node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ml | |
channels: | |
- apple | |
- defaults | |
- conda-forge | |
dependencies: | |
- anyio=3.5.0 | |
- aom=3.3.0 | |
- appdirs=1.4.4 | |
- appnope=0.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conosle.log('Hello World'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conosle.log('Hello World'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run 'node hello_world.js' to print Hello World |
NewerOlder