NameError Traceback (most recent call last)
in ()
8 print(X_1[0].shape)
9 model = build_DD_Net(C)
---> 10 model = load_model("jhmdb_split1_wn.h5")
11 layer_name = 'dense_5'
12 # data = [X_0,X_1]
~/anaconda3/lib/python3.6/site-packages/keras/models.py in load_model(filepath, custom_objects, compile)
268 raise ValueError('No model found in config file.')
269 model_config = json.loads(model_config.decode('utf-8'))
--> 270 model = model_from_config(model_config, custom_objects=custom_objects)
271
272 # set weights
~/anaconda3/lib/python3.6/site-packages/keras/models.py in model_from_config(config, custom_objects)
345 'Maybe you meant to use '
346 'Sequential.from_config(config)
?')
--> 347 return layer_module.deserialize(config, custom_objects=custom_objects)
348
349
~/anaconda3/lib/python3.6/site-packages/keras/layers/init.py in deserialize(config, custom_objects)
53 module_objects=globs,
54 custom_objects=custom_objects,
---> 55 printable_module_name='layer')
~/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
142 return cls.from_config(config['config'],
143 custom_objects=dict(list(_GLOBAL_CUSTOM_OBJECTS.items()) +
--> 144 list(custom_objects.items())))
145 with CustomObjectScope(custom_objects):
146 return cls.from_config(config['config'])
~/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py in from_config(cls, config, custom_objects)
2523 # First, we create all layers and enqueue nodes to be processed
2524 for layer_data in config['layers']:
-> 2525 process_layer(layer_data)
2526 # Then we process nodes in order of layer depth.
2527 # Nodes that cannot yet be processed (if the inbound node
~/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py in process_layer(layer_data)
2509
2510 layer = deserialize_layer(layer_data,
-> 2511 custom_objects=custom_objects)
2512 created_layers[layer_name] = layer
2513
~/anaconda3/lib/python3.6/site-packages/keras/layers/init.py in deserialize(config, custom_objects)
53 module_objects=globs,
54 custom_objects=custom_objects,
---> 55 printable_module_name='layer')
~/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
142 return cls.from_config(config['config'],
143 custom_objects=dict(list(_GLOBAL_CUSTOM_OBJECTS.items()) +
--> 144 list(custom_objects.items())))
145 with CustomObjectScope(custom_objects):
146 return cls.from_config(config['config'])
~/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py in from_config(cls, config, custom_objects)
2533 if layer in unprocessed_nodes:
2534 for node_data in unprocessed_nodes.pop(layer):
-> 2535 process_node(layer, node_data)
2536
2537 name = config.get('name')
~/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py in process_node(layer, node_data)
2490 if input_tensors:
2491 if len(input_tensors) == 1:
-> 2492 layer(input_tensors[0], **kwargs)
2493 else:
2494 layer(input_tensors, **kwargs)
~/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py in call(self, inputs, **kwargs)
617
618 # Actually call the layer, collecting output(s), mask(s), and shape(s).
--> 619 output = self.call(inputs, **kwargs)
620 output_mask = self.compute_mask(inputs, previous_mask)
621
~/anaconda3/lib/python3.6/site-packages/keras/layers/core.py in call(self, inputs, mask)
683 if has_arg(self.function, 'mask'):
684 arguments['mask'] = mask
--> 685 return self.function(inputs, **arguments)
686
687 def compute_mask(self, inputs, mask=None):
~/anaconda3/lib/python3.6/site-packages/keras/layers/core.py in (x)
6
7 def pose_motion(P,frame_l):
----> 8 P_diff_slow = Lambda(lambda x: poses_diff(x))(P)
9 P_diff_slow = Reshape((frame_l,-1))(P_diff_slow)
10 P_fast = Lambda(lambda x: x[:,::2,...])(P)
NameError: name 'poses_diff' is not defined