2018년 4월 12일 목요일

quiver_engine 설치 오류 해결 방법

https://github.com/keplr-io/quiver/issues/32


agree with upstair, detail desrcription:
  1. search keyword "quiver“ at pypi webside (https://pypi.python.org/pypi);
  2. download one of quiver package name "quiver_engine 0.1.4.1.4";
  3. unzip it on local disk and "cd ....\quiver_engine 0.1.4.1.4\”;
  4. just run "pip install -e .", it will auto call setup.py, then quiver_engine installed without any problem;
  5. run python under dos "cmd";
  6. just for test, type "from quiver_engine impor server" and no error is reported;
  7. just for use in keras, look detail on function server.lunch, type "help(quiver_engine.server.lanuch", you will find it suggest only 5 parameter like below and NEEDN'T CLASSES MEAN STD TOP these 4 parameters!!!"

help(server.launch)
Help on function launch in module quiver_engine.server:
launch(model, temp_folder='./tmp', input_folder='./', port=5000, html_base_dir=None)

  1. it you add codes below, you MUST first make dir you need first!
    server.launch(model = model,temp_folder='./quiver/tmp',input_folder='./quiver/input_imgs',port=5000)
    9, run codes with launch function in pycharm or python, quiver_engine will OPEN A WEBPAGE show your images (you FIRST copy to input_folder before run codes) and select it to see feature maps in your diagram show also on web page's left frame.
  2. if it run OK as mentioned in step 9, you trains will BLOCKED by quiver_engine!

[tensorflow] tensorboard 사용

f://test/program/log/log1

안에 이벤트가 있으면

tensorboard --logdir=f://test/program/log/log1

라고 하면 된다.

여기서 띄어쓰기 하면 안된다.

-- 가끔 안되는 사람들은 f://test/program/log 까지 이동한 후

tensorboard --logdir=log1

이렇게 실행했더니 된다고 하는 사람들이 있었다.

( https://github.com/tensorflow/tensorflow/issues/9701 )

info_bio

https://followthedata.wordpress.com/2015/12/21/list-of-deep-learning-implementations-in-biology/

2018년 4월 9일 월요일

[numpy] one hot encoding

import numpy as np

x = [ 3 , 4 , 1]

x = np.asarray( x )

eye = np.eye(5)

print(eye)

x = x.reshape(-1)
print(x)

res = eye[x]

print(res)

2018년 4월 7일 토요일

[tensorflow] 옵티마이저에서 그라디언트구해서 업데이트 하는 두가지 방법.

https://stackoverflow.com/questions/45473682/difference-between-apply-gradients-and-minimize-of-optimizer-in-tensorflow?rq=1


텐서 플로우에서 옵티마이저로 구한 그래디언트를 적용하는 방법은 두가지 이다.


1. 자동으로
optimizer = tf.train.AdamOptimizer(1e-3)
train_op = optimizer.minimize(cnn.loss, global_step=global_step)







2. 수동으로


optimizer = tf.train.AdamOptimizer(1e-3)
grads_and_vars = optimizer.compute_gradients(cnn.loss)
train_op = optimizer.apply_gradients(grads_and_vars, global_step=global_step)


수동으로 할때는 구해진 그라디언트를 바로 적용하기 전에 다른일을 할 수 있다.