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: pdf_extractor_env | |
channels: | |
- conda-forge | |
- defaults | |
dependencies: | |
- _libgcc_mutex=0.1=main | |
- _openmp_mutex=5.1=1_gnu | |
- blas=1.0=openblas | |
- bottleneck=1.3.5=py39h7deecbd_0 | |
- brotli=1.0.9=he6710b0_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
name: instant_ngp_env | |
channels: | |
- nvidia | |
- conda-forge | |
- defaults | |
dependencies: | |
- _libgcc_mutex=0.1=main | |
- _openmp_mutex=4.5=1_gnu | |
- alsa-lib=1.2.3=h516909a_0 | |
- blas=1.0=mkl |
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 _get_unit_square_intercepts(self, slopes, intercept): | |
""" | |
returns unit square intercepts for given slope (a) and intercepts (b) | |
y = ax + b | |
solves: | |
right: y = a + b | |
x = 1 | |
y = slopes + intercept | |
left: y = b | |
x = 0 |
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
# cf from https://arxiv.org/abs/1812.07035 | |
import tensorflow as tf | |
def rotation_matrix_to_label_6d_flat(rotation_matrices): | |
""" | |
takes batch x 3x3 rotation matrix, returns a flat batch x 6 floats for loss | |
:param rotation_matrices: batch x (3x3) rotation matrix | |
:return: flat batch x 6 floats for loss | |
""" | |
return tf.concat([rotation_matrices[:, :, 0], rotation_matrices[:, :, 1]], axis=1) |
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 tensorflow as tf | |
from sklearn.manifold import TSNE | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
def explore_embedding_size(number_of_categories, embedding_sizes): | |
fig = plt.figure(figsize=(15, 9)) | |
figure_title = f"Embedding size TSNEs for {number_of_categories} categories" |