developer.nvidia.com/rdp/cudnn-archive

 

 

 

cuDNN Archive

NVIDIA cuDNN is a GPU-accelerated library of primitives for deep neural networks.

developer.nvidia.com

 

 

 

cuDNN Archive

NVIDIA cuDNN is a GPU-accelerated library of primitives for deep neural networks.

developer.nvidia.com

O:\PycharmProjects\catdogtf2.2\venv\Scripts\python.exe O:\PyCharm\plugins\python\helpers\pydev\pydevconsole.py --mode=client --port=64360

import sys; print('Python %s on %s' % (sys.version, sys.platform))

sys.path.extend(['O:\\PycharmProjects\\catdogtf2.2', 'O:/PycharmProjects/catdogtf2.2'])

Python 3.7.7 (default, May  6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)]

Type 'copyright', 'credits' or 'license' for more information

IPython 7.17.0 -- An enhanced Interactive Python. Type '?' for help.

PyDev console: using IPython 7.17.0

Python 3.7.7 (default, May  6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] on win32

runfile('O:/PycharmProjects/catdogtf2.2/011.py', wdir='O:/PycharmProjects/catdogtf2.2')

2020-08-11 23:46:36.286074: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll

2020-08-11 23:46:38.674622: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll

2020-08-11 23:46:38.720106: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties:

pciBusID: 0000:09:00.0 name: GeForce RTX 2080 SUPER computeCapability: 7.5

coreClock: 1.845GHz coreCount: 48 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 462.00GiB/s

2020-08-11 23:46:38.720565: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll

2020-08-11 23:46:38.726673: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll

2020-08-11 23:46:38.732489: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll

2020-08-11 23:46:38.735232: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll

2020-08-11 23:46:38.740938: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll

2020-08-11 23:46:38.745164: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll

2020-08-11 23:46:38.756268: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll

2020-08-11 23:46:38.756538: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0

2020-08-11 23:46:38.757098: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

2020-08-11 23:46:38.768795: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1c869f94010 initialized for platform Host (this does not guarantee that XLA will be used). Devices:

2020-08-11 23:46:38.769107: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version

2020-08-11 23:46:38.769455: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties:

pciBusID: 0000:09:00.0 name: GeForce RTX 2080 SUPER computeCapability: 7.5

coreClock: 1.845GHz coreCount: 48 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 462.00GiB/s

2020-08-11 23:46:38.770157: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll

2020-08-11 23:46:38.770386: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll

2020-08-11 23:46:38.770665: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll

2020-08-11 23:46:38.770888: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll

2020-08-11 23:46:38.771094: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll

2020-08-11 23:46:38.771287: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll

2020-08-11 23:46:38.771487: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll

2020-08-11 23:46:38.771738: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0

2020-08-11 23:46:39.486030: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:

2020-08-11 23:46:39.486238: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0

2020-08-11 23:46:39.486365: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N

2020-08-11 23:46:39.486691: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6166 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 SUPER, pci bus id: 0000:09:00.0, compute capability: 7.5)

2020-08-11 23:46:39.490307: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1c8080712b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:

2020-08-11 23:46:39.490674: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): GeForce RTX 2080 SUPER, Compute Capability 7.5

[104, 195, 108, 108, 111]

[87, 104, 97, 116, 32, 105, 115, 32, 116, 104, 101, 32, 119, 101, 97, 116, 104, 101, 114, 32, 116, 111, 109, 111, 114, 114, 111, 119]

[71, 246, 246, 100, 110, 105, 103, 104, 116]

[128522]

[[   104    195    108    108    111     -1     -1     -1     -1     -1

      -1     -1     -1     -1     -1     -1     -1     -1     -1     -1

      -1     -1     -1     -1     -1     -1     -1     -1]

 [    87    104     97    116     32    105    115     32    116    104

     101     32    119    101     97    116    104    101    114     32

     116    111    109    111    114    114    111    119]

 [    71    246    246    100    110    105    103    104    116     -1

      -1     -1     -1     -1     -1     -1     -1     -1     -1     -1

      -1     -1     -1     -1     -1     -1     -1     -1]

 [128522     -1     -1     -1     -1     -1     -1     -1     -1     -1

      -1     -1     -1     -1     -1     -1     -1     -1     -1     -1

      -1     -1     -1     -1     -1     -1     -1     -1]]

11 바이트; 8개의 UTF-8 문자

b'\xf0\x9f\x98\x8a'

바이트 오프셋 0: 코드 포인트 127880

바이트 오프셋 4: 코드 포인트 127881

바이트 오프셋 8: 코드 포인트 127882

[17  8]

<tf.RaggedTensor [[25, 25, 25, 25, 25], [25, 25, 25, 25, 0, 25, 25, 0, 25, 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 25], [25, 25, 25, 25, 25, 25, 25, 25, 25], [0]]>

<tf.RaggedTensor [[72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 46], [19990, 30028, 12371, 12435, 12395, 12385, 12399]]>

<tf.RaggedTensor [[25, 25, 25, 25, 25, 0, 0, 25, 25, 25, 25, 25, 0], [17, 17, 20, 20, 20, 20, 20]]>

tf.Tensor([ 0  5  7 12 13 15], shape=(6,), dtype=int64)

<tf.RaggedTensor [[72, 101, 108, 108, 111], [44, 32], [119, 111, 114, 108, 100], [46], [19990, 30028], [12371, 12435, 12395, 12385, 12399]]>

<tf.RaggedTensor [[[72, 101, 108, 108, 111], [44, 32], [119, 111, 114, 108, 100], [46]], [[19990, 30028], [12371, 12435, 12395, 12385, 12399]]]>

 

 

import tensorflow as tf

 

tf.constant(u"Thanks 😊")

 

tf.constant([u"You're", u"welcome!"]).shape

 

# UTF-8로 인코딩된 string 스칼라로 표현한 유니코드 문자열입니다.

text_utf8 = tf.constant(u"")

text_utf8

 

# UTF-16-BE로 인코딩된 string 스칼라로 표현한 유니코드 문자열입니다.

text_utf16be = tf.constant(u"".encode("UTF-16-BE"))

text_utf16be

 

# 유니코드 코드 포인트의 벡터로 표현한 유니코드 문자열입니다.

text_chars = tf.constant([ord(char) for char in u""])

text_chars

 

tf.strings.unicode_decode(text_utf8,

                          input_encoding='UTF-8')

 

tf.strings.unicode_encode(text_chars,

                          output_encoding='UTF-8')

 

tf.strings.unicode_transcode(text_utf8,

                             input_encoding='UTF8',

                             output_encoding='UTF-16-BE')

 

# UTF-8 인코딩된 문자열로 표현한 유니코드 문자열의 배치입니다.

batch_utf8 = [s.encode('UTF-8') for s in

              [u'hÃllo',  u'What is the weather tomorrow',  u'Göödnight', u'😊']]

batch_chars_ragged = tf.strings.unicode_decode(batch_utf8,

                                               input_encoding='UTF-8')

for sentence_chars in batch_chars_ragged.to_list():

    print(sentence_chars)

 

batch_chars_padded = batch_chars_ragged.to_tensor(default_value=-1)

print(batch_chars_padded.numpy())

 

batch_chars_sparse = batch_chars_ragged.to_sparse()

 

tf.strings.unicode_encode([[99, 97, 116], [100, 111, 103], [ 99, 111, 119]],

                          output_encoding='UTF-8')

 

tf.strings.unicode_encode(batch_chars_ragged, output_encoding='UTF-8')

 

tf.strings.unicode_encode(

    tf.RaggedTensor.from_sparse(batch_chars_sparse),

    output_encoding='UTF-8')

 

tf.strings.unicode_encode(

    tf.RaggedTensor.from_tensor(batch_chars_padded, padding=-1),

    output_encoding='UTF-8')

 

# UTF8에서 마지막 문자는 4바이트를 차지합니다.

thanks = u'Thanks 😊'.encode('UTF-8')

num_bytes = tf.strings.length(thanks).numpy()

num_chars = tf.strings.length(thanks, unit='UTF8_CHAR').numpy()

print('{} 바이트; {}개의 UTF-8 문자'.format(num_bytes, num_chars))

 

# 기본: unit='BYTE'. len=1이면 바이트 하나를 반환합니다.

tf.strings.substr(thanks, pos=7, len=1).numpy()

 

# unit='UTF8_CHAR'로 지정하면 4 바이트인 문자 하나를 반환합니다.

print(tf.strings.substr(thanks, pos=7, len=1, unit='UTF8_CHAR').numpy())

 

tf.strings.unicode_split(thanks, 'UTF-8').numpy()

 

codepoints, offsets = tf.strings.unicode_decode_with_offsets(u"🎈🎉🎊", 'UTF-8')

 

for (codepoint, offset) in zip(codepoints.numpy(), offsets.numpy()):

    print("바이트 오프셋 {}: 코드 포인트 {}".format(offset, codepoint))

 

uscript = tf.strings.unicode_script([33464, 1041])  # ['', 'Б']

 

print(uscript.numpy())  # [17, 8] == [USCRIPT_HAN, USCRIPT_CYRILLIC]

 

print(tf.strings.unicode_script(batch_chars_ragged))

 

# dtype: string; shape: [num_sentences]

#

# 처리할 문장들 입니다. 이 라인을 수정해서 다른 입력값을 시도해 보세요!

sentence_texts = [u'Hello, world.', u'世界こんにちは']

 

# dtype: int32; shape: [num_sentences, (num_chars_per_sentence)]

#

# sentence_char_codepoint[i, j]

# i번째 문장 안에 있는 j번째 문자에 대한 코드 포인트 입니다.

sentence_char_codepoint = tf.strings.unicode_decode(sentence_texts, 'UTF-8')

print(sentence_char_codepoint)

 

# dtype: int32; shape: [num_sentences, (num_chars_per_sentence)]

#

# sentence_char_codepoint[i, j]

# i번째 문장 안에 있는 j번째 문자의 유니코드 스크립트 입니다.

sentence_char_script = tf.strings.unicode_script(sentence_char_codepoint)

print(sentence_char_script)

 

# dtype: bool; shape: [num_sentences, (num_chars_per_sentence)]

#

# sentence_char_starts_word[i, j]

# i번째 문장 안에 있는 j번째 문자가 단어의 시작이면 True 입니다.

sentence_char_starts_word = tf.concat(

    [tf.fill([sentence_char_script.nrows(), 1], True),

     tf.not_equal(sentence_char_script[:, 1:], sentence_char_script[:, :-1])],

    axis=1)

 

# dtype: int64; shape: [num_words]

#

# word_starts[i] (모든 문장의 문자를 일렬로 펼친 리스트에서)

# i번째 단어가 시작되는 문자의 인덱스 입니다.

word_starts = tf.squeeze(tf.where(sentence_char_starts_word.values), axis=1)

print(word_starts)

 

# dtype: int32; shape: [num_words, (num_chars_per_word)]

#

# word_char_codepoint[i, j]

# i번째 단어 안에 있는 j번째 문자에 대한 코드 포인트 입니다.

word_char_codepoint = tf.RaggedTensor.from_row_starts(

    values=sentence_char_codepoint.values,

    row_starts=word_starts)

print(word_char_codepoint)

 

# dtype: int64; shape: [num_sentences]

#

# sentence_num_words[i] i번째 문장 안에 있는 단어의 수입니다.

sentence_num_words = tf.reduce_sum(

    tf.cast(sentence_char_starts_word, tf.int64),

    axis=1)

 

# dtype: int32; shape: [num_sentences, (num_words_per_sentence), (num_chars_per_word)]

#

# sentence_word_char_codepoint[i, j, k] i번째 문장 안에 있는

# j번째 단어 안의 k번째 문자에 대한 코드 포인트입니다.

sentence_word_char_codepoint = tf.RaggedTensor.from_row_lengths(

    values=word_char_codepoint,

    row_lengths=sentence_num_words)

print(sentence_word_char_codepoint)

 

tf.strings.unicode_encode(sentence_word_char_codepoint, 'UTF-8').to_list()

 

 

#

# Copyright (c) 2017 François Chollet

#

# Permission is hereby granted, free of charge, to any person obtaining a

# copy of this software and associated documentation files (the "Software"),

# to deal in the Software without restriction, including without limitation

# the rights to use, copy, modify, merge, publish, distribute, sublicense,

# and/or sell copies of the Software, and to permit persons to whom the

# Software is furnished to do so, subject to the following conditions:

#

# The above copyright notice and this permission notice shall be included in

# all copies or substantial portions of the Software.

#

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL

# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

# DEALINGS IN THE SOFTWARE.

 

 

www.robots.ox.ac.uk/~vgg/data/pets/

 

Visual Geometry Group - University of Oxford

 

www.robots.ox.ac.uk

 

'진행 프로젝트 > [진행] Tensorflow2 &amp;amp;amp;amp;quot;해볼까?&amp;amp;amp;amp;quot;' 카테고리의 다른 글

ㅡㅡ;  (0) 2020.10.27
tutorials 10  (0) 2020.08.11
tutorials 09  (0) 2020.08.11
tutorials 08  (0) 2020.08.11
tutorials 07  (0) 2020.08.11

+ Recent posts