View gist:5c0ead2444c860132cdb99daec035d04
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
https://gist.github.com/Flock1/ae6a8594c1713287d5751f8a06d2907a |
View gist:d03a6d2814099379780cfd7ff9b07ab3
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
Processing /home/user/Desktop/RBC/box-convolutions | |
Requirement already satisfied: future in /home/user/anaconda3/envs/tf/lib/python3.6/site-packages (from box-convolution==0.0.0) (0.17.1) | |
Requirement already satisfied: torch>=1.0.0a0 in /home/user/anaconda3/envs/tf/lib/python3.6/site-packages (from box-convolution==0.0.0) (1.0.1.post2) | |
Building wheels for collected packages: box-convolution | |
Running setup.py bdist_wheel for box-convolution ... error | |
Failed building wheel for box-convolution | |
Running setup.py clean for box-convolution | |
Failed to build box-convolution | |
Installing collected packages: box-convolution | |
Running setup.py install for box-convolution ... error |
View gist:8c82d180e1e9fd9c01c1cefbb9742d21
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
Created temporary directory: /tmp/pip-ephem-wheel-cache-h28bm0z4 | |
Created temporary directory: /tmp/pip-req-tracker-a9vehy36 | |
Created requirements tracker '/tmp/pip-req-tracker-a9vehy36' | |
Created temporary directory: /tmp/pip-install-lla89gd9 | |
Processing /home/sarvagya/Desktop/RBC/box-convolutions | |
Created temporary directory: /tmp/pip-req-build-k9raxzlj | |
Added file:///home/sarvagya/Desktop/RBC/box-convolutions to build tracker '/tmp/pip-req-tracker-a9vehy36' | |
Running setup.py (path:/tmp/pip-req-build-k9raxzlj/setup.py) egg_info for package from file:///home/sarvagya/Desktop/RBC/box-convolutions | |
Running command python setup.py egg_info | |
running egg_info |
View training.py
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
def act(self, data,t): #state | |
rate = self.get_exploration_rate(t) | |
if random.random() < rate: | |
options = self.model.predict(data) #state | |
options = np.squeeze(options) | |
action = random.randrange(self.action_size) | |
else: | |
options = self.model.predict(data) #state | |
options = np.squeeze(options) | |
action = options.argmax() |
View values.txt
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
p1_0: [0.5404173787448456, 0.41291281118626466, 1.0, 0.0] | |
p2_0: [0.4595826212551544, 0.5870871888137354, 0.0, 1.0] | |
idx_0: ['3FLip X', '5FLip X', '7FLip X', '9FLip X'] | |
p1_1: [0.4595826212551544] | |
p2_1: [0.5404173787448456] | |
idx_1: ['4Flip Y'] | |
p1_2: [] | |
p2_2: [] | |
idx_2: [] | |
p1_3: [0.03264615290754886, 0.4595826212551544] |
View fastai_UNet.py
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
from torch.utils.data import Dataset, DataLoader | |
import pandas as pd | |
import numpy as np | |
import cv2 | |
import matplotlib.pyplot as plt | |
import matplotlib.image as mpimg | |
from sklearn.model_selection import train_test_split | |
# from fastai.vision.models import resnet34 | |
# from fastai.vision.leaner import unet_learner | |
from fastai.vision import * |
View pytorch_load_model.py
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
class ActorCritic(nn.Module): | |
def __init__(self, num_inputs, num_outputs, hidden_size, std=0.0): | |
super(ActorCritic, self).__init__() | |
self.critic = nn.Sequential( | |
nn.Linear(num_inputs, hidden_size), | |
nn.ReLU(), | |
nn.Linear(hidden_size, 1) | |
) | |
View intro.py
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 matplotlib.pyplot as plt | |
from sklearn.model_selection import train_test_split | |
from sklearn.utils import shuffle | |
import tensorflow as tf | |
from tensorflow import keras | |
from tensorflow.keras import backend as K | |
from tensorflow.keras.models import load_model, Sequential | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.utils import Sequence |
View error.log
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
Collecting git+https://github.com/facebookresearch/pytorch3d.git | |
Cloning https://github.com/facebookresearch/pytorch3d.git to /tmp/pip-req-build-yyykcly2 | |
Running command git clone -q https://github.com/facebookresearch/pytorch3d.git /tmp/pip-req-build-yyykcly2 | |
Requirement already satisfied: torchvision>=0.4 in ./anaconda3/envs/work/lib/python3.8/site-packages (from pytorch3d==0.2.0) (0.6.0a0+82fd1c8) | |
Processing ./.cache/pip/wheels/a6/c2/56/ce21635637947b871a9b39e6cb33e3f11ec6e65acb8f901ccb/fvcore-0.1.1.post20200716-py3-none-any.whl | |
Requirement already satisfied: numpy in ./anaconda3/envs/work/lib/python3.8/site-packages (from torchvision>=0.4->pytorch3d==0.2.0) (1.19.1) | |
Requirement already satisfied: torch in ./anaconda3/envs/work/lib/python3.8/site-packages (from torchvision>=0.4->pytorch3d==0.2.0) (1.5.0) | |
Requirement already satisfied: pillow>=4.1.1 in ./anaconda3/envs/work/lib/python3.8/site-packages (from torchvision>=0.4->pytorch3d==0.2.0) (7.2.0) | |
Collecting tqdm | |
Using cached tqdm-4.48.2-py2.py3-no |
View model.py
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 torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
import torchaudio | |
from torch.autograd import Variable |
OlderNewer