forked from Charleswyt/tf_audio_steganalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
40 lines (34 loc) · 1.21 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import utils
"""
Created on 2017.11.16
Finished on 2017.11.16
@author: Wang Yuntao
"""
# tf.variable_scope与tf.name_scope的区别:
"""
with tf.variable_scope("conv1"):
weights = tf.get_variable(name="weights",
shape=[3, 3, 3, 16],
initializer=tf.contrib.layers.xavier_initializer())
biases = tf.get_variable(name="biases",
shape=[16],
initializer=tf.constant_initializer(0.0))
print("------ variable_scope ------")
print("weights name: ", weights.name)
print("biases name: ", biases.name)
with tf.name_scope("conv1"):
weight = tf.get_variable(name="weights",
shape=[3, 3, 3, 16],
initializer=tf.contrib.layers.xavier_initializer())
biases = tf.get_variable(name="biases",
shape=[16],
initializer=tf.constant_initializer(0.0))
print("------ name_scope ------")
print("weights name: ", weights.name)
print("biases name: ", biases.name)
"""