title: How to Calculate Cosine Similarity Using TensorFlow
body: <pre><code>import pandas as pd
  import numpy as np
  
  df = pd.read_csv('shops.csv', sep='|') 
  df.columns = ['name',  # 상호명
                'cate_1',  # 중분류명
                'cate_2',  # 소분류명
                'cate_3',  # 표준산업분류명
                'dong',  # 행정동명
                'lon',  # 위도
                'lat'  # 경도
                ]
  df['cate_mix'] = df['cate_1'] + df['cate_2'] +  df['cate_3']
  df['cate_mix'] = df['cate_mix'].str.replace(&quot;/&quot;, &quot; &quot;)
  
  from sklearn.feature_extraction.text import CountVectorizer  # 피체 벡터화
  from sklearn.metrics.pairwise import cosine_similarity  # 코사인 유사도
  
  
  count_vect_category = CountVectorizer(min_df=0, ngram_range=(1,2))
  place_category = count_vect_category.fit_transform(df['cate_mix']) 
  place_simi_cate = cosine_similarity(place_category, place_category) 
  place_simi_cate_sorted_ind = place_simi_cate.argsort()[:, ::-1]
  </code></pre>
  <p>At this time, I want to calculate the cosine similarity as above,
  via tensorflow
  Is there any way to calculate it?</p>