You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to try the network with the padding = "SAME" in the code:
def conv2d(x, W):
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='VALID')
“””
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')
“””
in flie net.py,
and the it goes wrong:
in the code: l2_loss = tf.reduce_mean(tf.square(labels - model))
ValueError: Dimensions must be equal, but are 21 and 33 for 'sub' (op: 'Sub') with input shapes: [?,21,21,1], [?,33,33,1].
Can you tell me how to solve this problem? Thanks!
The text was updated successfully, but these errors were encountered:
@taburiss3525 Hello! First of all, thank you for sharing your ideas here. I recently encountered a problem when I reproduced this program. Can you help me?
Traceback (most recent call last):
File "net.py", line 162, in
train_SRCNN(images)
File "net.py", line 92, in train_SRCNN
train_data, train_label = load_data(train_path)
File "net.py", line 24, in load_data
with h5py.File(path, 'r') as hf:
File "/root/anaconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 408, in init
swmr=swmr)
File "/root/anaconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = './checkpoint/train.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Thank you very much! Looking forward to your reply!
When I try to try the network with the padding = "SAME" in the code:
def conv2d(x, W):
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='VALID')
“””
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')
“””
in flie net.py,
and the it goes wrong:
in the code: l2_loss = tf.reduce_mean(tf.square(labels - model))
ValueError: Dimensions must be equal, but are 21 and 33 for 'sub' (op: 'Sub') with input shapes: [?,21,21,1], [?,33,33,1].
Can you tell me how to solve this problem? Thanks!
The text was updated successfully, but these errors were encountered: