コッコ

AtCoder

AtCoder Beginner Contest 183の感想

ABC183に参加した。A - ReLUディープラーニングでおなじみReLU。x = int(input())ans = max(x, 0)print(ans)B - Billiards反射をそのまま考えると面倒なので、スタート地点をx軸で...
Deep Learning

RTX30シリーズで nvcc fatal : Value ‘sm_86’ is not defined for option ‘gpu-architecture’

RTX3090でTensorflowを使おうとした所、表題のエラー。nvcc fatal : Value 'sm_86' is not defined for option 'gpu-architecture'gpu-architectur...
Python

次元圧縮のUMAPでエラー module ‘umap’ has no attribute ‘UMAP’

PythonでUMAPを使おうとしたときに表題のエラー。module 'umap' has no attribute 'UMAP'pip install umapだとダメで、umap-learnをインストールするのが正解pip uninst...
Linux

DockerでGPUを使おうとしたらError response from daemon: linux runtime spec devices: could not select device driver “” with capabilities: [[gpu]]

docker container run --gpus all をした時に表題のエラー。NVIDIAドライバーがDockerを認識できていないか、nvidia container tools をインストールしたけどDockerのデーモンを再...
Linux

NVIDIAドライバーのインストールでAn NVIDIA kernel module ‘nvidia-drm’ appears to already be loaded in your kernel.

Ubuntu 18.04でNVIDIAドライバーを更新しようとした時に表題のエラー。$ sudo sh NVIDIA-Linux-x86_64-455.23.04.runAn NVIDIA kernel module 'nvidia-drm...
AtCoder

AtCoder Beginner Contest 182の感想

ABC182に参加した。A - twiblr引き算するだけ。a, b = map(int, input().split())ans = 2 * a + 100 - bprint(ans)B - Almost GCD1からmax(A)までの数...
AtCoder

AtCoder Beginner Contest 181の感想

ABC181をコンテスト後に解いた。A - Heavy Rotation偶数か奇数か判定する。n = int(input())if n % 2 != 0: print('Black')else: print('White')B - Trap...
Python

LightGBMでCannot use Dataset instance for prediction, please use raw data instead

LightGBMで2値分類の学習をさせていた際、表題のエラー。import lightgbm as lgblgb_train = lgb.Dataset(X_train, label=y_train)lgb_eval = lgb.Datas...
Deep Learning

sklearnやkearsのCross Validationを並列で実行して高速化する

Kaggleに取り組んでいた時、実行時間制限付きのノートブックコンペがあり、モデルを高速に実行する必要が出てきた。そこで、クロスバリデーションなら同時に更新する値や配列が無いため、なんとか並列実行出来ないか調べてみたところ、joblibを使...
Deep Learning

TensorflowやKerasで乱数シードを固定して同じ結果が出るようにする

機械学習やディープラーニングに取り組む時、様々なモデルを作って精度を比較することが多い。しかし、TensorflowやKerasではGPUを用いた学習の時に乱数を固定する方法がなく、結果が変わってもモデルの改良によるものなのか乱数による偶然...