Wide Applications: 1. Travelling: suitcase, handbag, travel bag, luggage, laptop, backpack, handbag, and so on. 2. Sports: gym locker, bike, bicycle, golf bags, and so on. 3. Public Areas: student dormitory, school locker, gym locker, employee locker, hospital locker, and so on. 4. Residential: door lock, gate, apartment lock, basement anti-theft security, and so on. 5. Business: office, hospital, fence, and so on. 6. Transportation: garage, toolbox, and so on . 7. Furniture: wardrobes, closet, cabinet, drawers, safes, and so on.
Specifications: * Fingerprint reader: 96*96 sensor * Waterproof level: IP56 * FRR:<1% * FAR:<0.002% * Material: zinc alloy * Working voltage: 3.0-4.2V * Lock weight and Size: 90g * Lock size: 7.6*4.6*1.3(cm) * Fingerprint sensor coverage: 72*64MM *Unlock speed: within 0.5 second *working period: a year per power Charge * LED light: three color light: red / blue / green * Battery: 3.7V lithium build in battery * Working temperature: -10~+40 degrees Celsius * Fingerprint capacity: record 10 times and save 10 groups
import tensorflow.compat.v1 as tf
import numpy as np
import gym
from collections import deque
import random
import os
tf.disable_v2_behavior()
def createFolder(directory):
try:
if not os.path.exists(directory):
os.makedirs(directory)
except OSError:
print ('Error: Creating directory. ' + directory)
sess = tf.Session()
DQNmain = DQNet(sess, input_size, output_size, "DQNMain")
modelSaver= tf.train.Saver(var_list= tf.global_variables(), allow_empty=False)
sess.run( tf.global_variables_initializer())
.....
.....
여러 코드 구현
.....
.....
createFolder('my_test_model')
modelSaver.save(sess, 'my_test_model/mymodel', write_meta_graph = False, global_step=global_step)
2. 불러다 쓰기
sess = tf.Session()
# 네트워크 구성
DQNmain = DQNet(sess, input_size, output_size, "DQNMain")
# modelsaver
modelSaver = tf.train.Saver(var_list = tf.global_variables(), allow_empty=False)
# 저장된 checkpoint 있는지 체크..
# 있으면 load.. 없으면 에러
ckpt = tf.train.get_checkpoint_state('my_test_model/')
if ckpt and tf.train.checkpoint_exists(ckpt.model_checkpoint_path):
modelSaver.restore(sess, ckpt.model_checkpoint_path)
else:
print("Model data not found...")
exit()