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 joblib import Parallel, delayed | |
import numpy as np | |
import time | |
from mne_features.feature_extraction import FeatureExtractor | |
feature=['mean','variance','std'] | |
fe = FeatureExtractor(sfreq=1024, selected_funcs=feature) | |
def f(x): |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Jun 11 18:58:05 2021 | |
# CALCULATE SENTENCE SIMILARITY | |
@author: TAC | |
""" | |
import torch#pytorch | |
from transformers import AutoTokenizer, AutoModel#for embeddings | |
from sklearn.metrics.pairwise import cosine_similarity#for similarity |
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
# data link | |
#https://drive.google.com/file/d/1EwjJx-V-Gq7NZtfiT6LZPLGXD2HN--qT/view?usp=sharing | |
from glob import glob | |
import cv2 | |
from PIL import Image | |
import os | |
import pandas as pd | |
import numpy as np |
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 torchvision | |
import torch | |
import torch.nn as nn | |
from time import time | |
from torch.optim.lr_scheduler import OneCycleLR | |
from pytorch_lightning import seed_everything, LightningModule, Trainer | |
from pytorch_lightning.callbacks import EarlyStopping,ModelCheckpoint,LearningRateMonitor | |
from torch.utils.data.dataloader import DataLoader |
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
Step1: | |
sudo apt update | |
sudo apt install build-essential | |
sudo apt-get install manpages-dev | |
sudo apt install gcc | |
Step2: | |
sudo sh cuda_11.8.0_520.61.05_linux.run |