Skip to content

Instantly share code, notes, and snippets.

--- functional.py_ 2022-08-23 17:07:29.000000000 +0900
+++ functional.py 2022-08-23 17:07:31.000000000 +0900
@@ -2506,9 +2506,9 @@ def layer_norm(
"""
if has_torch_function_variadic(input, weight, bias):
return handle_torch_function(
- layer_norm, (input, weight, bias), input, normalized_shape, weight=weight, bias=bias, eps=eps
+ layer_norm, (input.contiguous(), weight, bias), input, normalized_shape, weight=weight, bias=bias, eps=eps
)
- return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)
diff --git a/environment-mac.yaml b/environment-mac.yaml
index d923d56..c8a0a8e 100644
--- a/environment-mac.yaml
+++ b/environment-mac.yaml
@@ -3,14 +3,14 @@ channels:
- pytorch
- defaults
dependencies:
- - python=3.8.5
- - pip=20.3
@ktakayama
ktakayama / .textlintrc
Last active July 19, 2021 03:27
efm-langserver with textlint
{
"rules": {
"preset-ja-technical-writing": {
"sentence-length": false,
"max-comma": false,
"max-ten": false,
"arabic-kanji-numbers": false,
"ja-no-mixed-period": false,
"no-doubled-joshi": false,
"no-exclamation-question-mark": false,
@ktakayama
ktakayama / keybase.md
Created October 15, 2020 00:27
keybase.md

Keybase proof

I hereby claim:

  • I am ktakayama on github.
  • I am ktakayama (https://keybase.io/ktakayama) on keybase.
  • I have a public key whose fingerprint is 260A 7F4E B592 896E 08D5 B798 AE75 7815 F4B2 F985

To claim this, I am signing this object:

- (void) method {
UIApplication *application = [UIApplication sharedApplication];
[application cancelAllLocalNotifications];
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
NSDate *today = [NSDate date];
NSUInteger i = 0;
NSUInteger mx = 2;
@ktakayama
ktakayama / c-j_to_eisuu+c-j.json
Last active July 11, 2017 08:31
Ctrl-J to eisuu + Ctrl-J
{
"title": "Ctrl-J to eisuu + Ctrl-J",
"rules": [
{
"description": "Ctrl-J to eisuu + Ctrl-J",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "j",
@ktakayama
ktakayama / eisuu_to_command.json
Created July 3, 2017 02:00
英数キーをコマンドキーにする
{
"title": "英数キーをコマンドキーにする",
"rules": [
{
"description": "英数キーを単体で押したときに、コマンドキーキーを送信する。",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "japanese_eisuu",
@ktakayama
ktakayama / japanese_command.json
Created July 3, 2017 01:10
英数・カナキーをコマンドキーにする
{
"title": "英数・カナキーをコマンドキーにする",
"rules": [
{
"description": "英数・かなキーを単体で押したときに、コマンドキーキーを送信する。",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "japanese_eisuu",
protocol SpeakProtocol {
// func speak() -> String
func instinctSpeak() -> String
}
extension SpeakProtocol {
func speak() -> String {
return "I am anything"
}
protocol SpeakProtocol {
func speak() -> String
// func action() -> String
}
extension SpeakProtocol {
func speak() -> String {
print("SpeakProtocol's speak")
return "I am anything"
}