본문 바로가기

IT/Python30

tensorflow Keras - not_equal, cast Test 기본형태tf.keras.backend.not_equaltf.keras.backend.not_equal(x, y)Returns:A bool tensor.- Element-wise inequality between two tensors.​​tf.keras.backend.casttf.keras.backend.cast(x, dtype)Returns:Keras tensor with dtype `dtype`.- Casts a tensor to a different dtype and returns it.with tf.Session() as sess: test_input1 = Input(shape=(1, )) test_equal = K.not_equal([1, 2, -1, -1, 4, 5], -1) tester = K.. 2019. 3. 13.
keras Masking Test Definition:Masks a sequence by using a mask value to skip timesteps.For each timestep in the input tensor (dimension #1 in the tensor), if all values in the input tensor at that timestep are equal to mask_value, then the timestep will be masked (skipped) in all downstream layers (as long as they support masking).​But, I want to know the real output from Masking that expected.​Below to see how th.. 2019. 3. 13.
여러개의 DB를 Django 장고에 연동시키기 기존 Mysql or Mariadb를 사용하고 있었고, 이것을 장고에 연결 시키려고 한다. 1. django 프로젝트의 settings.py를 연다 . DATABASES = {} 여기에 기본적으로 'default'라는 key가 있다. 이 dictionary에 연결시킬 db정보를 넣는다. example로 'new_database' 로 넣었다.DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'HOST': 'localhost', 'NAME': 'test_db', 'USER': 'root', 'PASSWORD': 'mypw', 'PORT': 3306, 'CHARSET': 'utf8mb4', }, 'new_db1': { 'ENGINE': 'dja.. 2018. 11. 12.
/usr/bin/python3: No module named pip pip를 설치해야 한다. install pip for python 3 1. install pipsudo apt-get updatesudo apt-get install python3-setuptoolssudo easy_install3 pippip --version 2018. 2. 23.
반응형