Tensorflow에서 제공하는 tf.math.argmax함수는 tensor의 가장 큰 값의 index를 return해주는 함수이다. 기본 형태는 tf.math.argmax(input, axis = None, output_type = tf.dtype.int64, name = None) 위와 같다. input값은 tensor여야 하고, axis는 default는 0이고, max값을 찾을 축을 의미한다. 예제 1) a = tf.constant([2, 20, 30, 6, 3]) tf.math.argmax(a) a에서는 30이 가장 큰 값이고, 30의 index는 2 이므로, argmax 함수의 return 값은 2가 된다. 예제 2) a = tf.constant([[2, 20, 30, 3, 6], [3, 11..
Tensorflow에서 제공하는 tf.math.equal 함수는 입력값 두개가 같은지 다른지 비교해주는 함수이다. 기본 형태로 tf.math.equal(x, y, name=None) 형태를 취한다. x와 y의 값을 원소별로 같은지 다른지 비교해주고 각각에 대한 True or False를 return해주는 함수이다. 예제 1) x = tf.constant([2, 4]) y = tf.constant([2, 4]) tf.math.equal(x, y) 에 대해서는 값이 [True, True]로 나온다. 예제 2) x = tf.constant([2,4]) y = tf.constant(2) tf.math.equal(x, y) 에 대해서는 값이 [True, False]로 나온다. 예제 3) x = tf.constan..

(이 글은 ubuntu 18.04를 기준으로 작성되었습니다) (error handling 기록용으로 작성된 것이므로 정확하지 않은 지식이 포함되어있을 수 있습니다) tensorflow-gpu를 설치하고 import tensorflow as tf tf.test.is_gpu_available() 을 수행하였을 때 False값이 나왔다. 띠용... GPU가 잘 잡히고 있는지 확인할 때 쓰는 방법으로도 확인을 해보았다. from tensorflow.python.client import device_lib device_lib.list_local_devices() 결과는 이런식으로 CPU와 XLA_GPU만 잡혔다. 여기에 GPU가 잡혀야 GPU를 제대로 사용할 수 있다고 한다. 고치기 위해... 총총.. tf.te..
warning message /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) 다음과 같은 error message를 검색해보니 tensorflow version과 numpy version이 충돌나서 생기는 문제였다. 나..
Pointnet++을 compile하려는 와중에 여러가지 error를 만났다. 1. tensorflow/core/framework/op.h 를 include하지 못하는 문제 Not found error는 당연히 path 문제일 것이라고 생각해서 path를 확인해봤지만 path에는 문제가 없었다. tensorflow를 왜 못찾을까... 생각을 해보니 '혹시 python3 가 아니라 python2 가 쓰이고 있는건 아닐까?' 하는 생각이 들었다. 아니나 다를까 shell script에 쓰여진 command는 python ~~~ 이었고 나의 default python은 python2이고, 내가 tensorflow를 install 해 놓은 것은 python3였기 때문에 안되는 것이었다..ㅇㅅㅇ 임시 해결: 모든..
- Total
- Today
- Yesterday
- n과m
- error
- 다익스트라
- CUDA
- version
- docker
- 백준
- numpy
- 설치
- 파이썬
- 카카오
- 최소신장트리
- torch
- tensorflow
- Python
- notfound
- pytorch
- torchscript
- PIP
- 백트래킹
- 프로그래머스
- 코딩테스트
- BFS
- 설치하기
- LGSVL
- matplotlib
- 이것이코딩테스트다
- dfs
- shellscript
- 동적프로그래밍
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |