1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

fix for intel optimized tensorflow on distributed runs + adding coach_env to .gitignore

This commit is contained in:
galleibo-intel
2017-11-06 19:41:32 +02:00
parent b40259c61a
commit f47b8092af
3 changed files with 4 additions and 4 deletions

View File

@@ -343,8 +343,8 @@ class Agent(object):
:param to_type: can be 'channels_first' or 'channels_last'
:return: a new observation with the requested axes order
"""
if from_type == to_type:
return
if from_type == to_type or len(observation.shape) == 1:
return observation
assert 2 <= len(observation.shape) <= 3, 'num axes of an observation must be 2 for a vector or 3 for an image'
assert type(observation) == np.ndarray, 'observation must be a numpy array'
if len(observation.shape) == 3: