This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to install tensorflow on mac m1 pro with venv (or virtualenv) without conda | |
# step 1: install venv for mac | |
# step 2: create a virtual environment named venv | |
python3 -m venv venv | |
# step 3: activate environment | |
source venv/bin/activate | |
# step 4: install tensorflow for mac os | |
python -m pip install tensorflow-macos | |
# step 5: install tensorflow metal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
#hyperparameter'leri tanımlıyoruz. | |
#time-step gibi. | |
max_len = 20 | |
step = 1 | |
num_units = 256 | |
learning_rate = 0.001 | |
batch_size = 128 | |
epoch = 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
#set hyperparameters | |
max_len = 40 | |
step = 2 | |
num_units = 128 | |
learning_rate = 0.001 | |
batch_size = 200 | |
epoch = 60 |