Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenWizard2015 committed Apr 12, 2024
1 parent 3a4c3e1 commit 4c34ea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NN/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def normVec(x):

def ensure4d(src):
shp = tf.shape(src)
if 4 == len(shp): return src
if 3 == len(shp): return tf.reshape(src, tf.concat([shp, [1]], axis=0))
if 4 == len(src.shape): return src
if 3 == len(src.shape): return tf.reshape(src, tf.concat([shp, [1]], axis=0))
raise ValueError('Invalid shape: {}'.format(shp))

def extractInterpolated(data, pos):
Expand Down

0 comments on commit 4c34ea6

Please sign in to comment.