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 | |
from random import randint | |
import tensorflow as tf | |
from tensorflow.keras.layers import Input, LSTM, RepeatVector, TimeDistributed, Dense | |
from functools import lru_cache | |
import time | |
NUM_SERIES = 1000 | |
TRAIN_SET_SIZE = 1000 |
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 re | |
import os | |
from typing import Dict, Tuple, List | |
import sys | |
import shutil | |
from argparse import ArgumentParser | |
def group_file_names(d: str) -> Dict[str, List[Tuple[str, str]]]: | |
""" |
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
# based on: https://www.learnopencv.com/rotation-matrix-to-euler-angles/ | |
import numpy as np | |
import math | |
def is_rotmat(r) : | |
ident = np.identity(3, dtype=r.dtype) | |
r2 = np.dot(np.transpose(r), r) | |
return np.linalg.norm(ident - r2) < 1e-6 | |