This file contains hidden or 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 | |
| def iterate(alpha, n, P, pi): | |
| e = np.array([[1], [1], [1], [1], [1], [1]]) | |
| return (alpha * e)/n + (1-alpha) * np.matmul(np.transpose(P), pi) | |
| if __name__ == "__main__": | |
| P = np.array([ | |
| [0, 0.5, 0, 0.5, 0, 0], |
This file contains hidden or 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
| function! LoadTerminal() | |
| let bnr = bufnr('!/bin/bash') | |
| if bnr > 0 | |
| :sbuffer !/bin/bash | |
| else | |
| :term | |
| endif | |
| endfunction |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| from torch.utils.data import DataLoader | |
| from datasets import load_dataset | |
| import numpy as np | |
| from typing import Dict, Any | |
| from torch.optim import Optimizer | |
OlderNewer