Skip to content

Instantly share code, notes, and snippets.

View philippmuench's full-sized avatar

Philipp Münch philippmuench

View GitHub Profile
@philippmuench
philippmuench / LLaMA.R
Created October 15, 2024 23:03 — forked from t-kalinowski/LLaMA.R
LLaMA implemented in R Tensorflow and Keras
## Setup
Sys.setenv(CUDA_VISIBLE_DEVICES='')
options(tensorflow.extract.warn_tensors_passed_asis = FALSE)
library(dplyr, warn.conflicts = FALSE)
library(purrr)
library(glue)
library(envir)
library(tensorflow)
@philippmuench
philippmuench / multiplicative_lstm.R
Created June 18, 2019 09:13 — forked from jjallaire/multiplicative_lstm.R
Custom Multiplicative LSTM Layer for R Keras
library(keras)
library(reticulate)
layer_multiplicative_lstm <-function(
object, units, activation = "tanh", recurrent_activation = "hard_sigmoid", use_bias = TRUE,
return_sequences = FALSE, return_state = FALSE, go_backwards = FALSE, stateful = FALSE, unroll = FALSE,
kernel_initializer = "glorot_uniform", recurrent_initializer = "orthogonal", bias_initializer = "zeros",
unit_forget_bias = TRUE, kernel_regularizer = NULL, recurrent_regularizer = NULL, bias_regularizer = NULL,
@philippmuench
philippmuench / VarScan2_format_converter.py
Created February 24, 2017 12:21 — forked from PoisonAlien/VarScan2_format_converter.py
Takes output file generated by VarScan2 somatic programme and converts the formats.
__author__ = "Anand M"
'''
Takes output file generated by VarScan2 somatic programme and converts the formats.
'''
import argparse, math, re
parser = argparse.ArgumentParser(
description="Converts VarScan2 somatic vcf to native format and vice-versa.\nInput is automatically detected")