전체 글227 Number of 1 Bits Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1:Input: 00000000000000000000000000001011 Output: 3 Explanation: The input binary string 00000000000000000000000000001011 has a total of three '1' bits. Example 2:Input: 00000000000000000000000010000000 Output: 1 Explanation: The input binary string 000000000000000.. 2019. 1. 24. Use Tensorboard on Jupyter Notebook without CLI Use Tensorboard in Jupyter Notebook. 1. tensorflow(-gpu) >= 1.3 2. Check python version and Jupyter Notebook python version are same.3. install jupyter-tensorboard pip(3) install jupyter-tensorboard 4. Restart jupyter notebook! [https://pypi.org/project/jupyter-tensorboard/] 2019. 1. 23. Hamming Distance The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note: 0 ≤ x, y < 231.Example:Input: x = 1, y = 4 Output: 2 Explanation: 1 (0 0 0 1) 4 (0 1 0 0) ↑ ↑ The above arrows point to positions where the corresponding bits are different. To solve this problem I used XOR operation.M.. 2019. 1. 23. tensorflow keras running error about initializers (Tensorflow version is 1.8) Error Message contains : "lstm/lstm_cell/recurrent_kernel/Initializer/random_normal" It means that it needs initailizersInitializations define the way to set the initial random weights of Keras layers The keyword arguments used for passing initializers to layers will depend on the layer. Usually it is simply kernel_initializer and bias_initializer:model.add(Dense(64, .. 2019. 1. 22. 이전 1 2 3 4 5 6 7 8 ··· 57 다음 반응형