Skip to content

Instantly share code, notes, and snippets.


Flock-Anizak Flock1

View GitHub Profile
View gist:5c0ead2444c860132cdb99daec035d04
View gist:d03a6d2814099379780cfd7ff9b07ab3
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 bdist_wheel for box-convolution ... error
Failed building wheel for box-convolution
Running clean for box-convolution
Failed to build box-convolution
Installing collected packages: box-convolution
Running install for box-convolution ... error
View gist:8c82d180e1e9fd9c01c1cefbb9742d21
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 (path:/tmp/pip-req-build-k9raxzlj/ egg_info for package from file:///home/sarvagya/Desktop/RBC/box-convolutions
Running command python egg_info
running egg_info
Flock1 /
Last active December 18, 2019 09:30
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)
options = self.model.predict(data) #state
options = np.squeeze(options)
action = options.argmax()
View values.txt
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]
from 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 import resnet34
# from import unet_learner
from import *
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.Linear(hidden_size, 1)
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
Collecting git+
Cloning to /tmp/pip-req-build-yyykcly2
Running command git clone -q /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
Flock1 /
Last active September 3, 2020 17:21
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