Tensortrade

tensortrade
from tensortrade.agents import DQNAgent

agent = DQNAgent(env)

res = agent.train(n_steps=200, save_path=”examples/agents/”)
==== EPISODE ID: 7ca3a5ac-4a71-4a72-80d9-e1771022ca88 ====
—————————————————————————
UnknownError Traceback (most recent call last)
in ()
3 agent = DQNAgent(env)
4
tensortrade more info tensortrade
—-> 5 res = agent.train(n_steps=200, save_path=”examples/agents/”)

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensortrade/agents/dqn_agent.py in train(self, n_steps, n_episodes, save_every, save_path, callback, **kwargs)
139 while not done:
140 threshold = eps_end + (eps_start – eps_end) * np.exp(-steps_done / eps_decay_steps)
–> 141 action = self.get_action(state, threshold=threshold)
142 next_state, reward, done, _ = self.env.step(action)
143

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensortrade/agents/dqn_agent.py in get_action(self, state, **kwargs)
tensortrade more info tensortrade
72 return np.random.choice(self.n_actions)
73 else:
—> 74 return np.argmax(self.policy_network(np.expand_dims(state, 0)))
75
76 def _apply_gradient_descent(self, memory: ReplayMemory, batch_size: int, learning_rate: float, discount_factor: float):

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/base_layer.py in __call__(self, inputs, *args, **kwargs)
820 with base_layer_utils.autocast_context_manager(
821 self._compute_dtype):
–> 822 outputs = self.call(cast_inputs, *args, **kwargs)
tensortrade click here tensortrade
823 self._handle_activity_regularization(inputs, outputs)
824 self._set_mask_metadata(inputs, outputs, input_masks)

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/sequential.py in call(self, inputs, training, mask)
265 if not self.built:
266 self._init_graph_network(self.inputs, self.outputs, name=self.name)
–> 267 return super(Sequential, self).call(inputs, training=training, mask=mask)
268
269 outputs = inputs # handle the corner case where self.layers is empty

tensortrade get more info tensortrade
~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py in call(self, inputs, training, mask)
715 return self._run_internal_graph(
716 inputs, training=training, mask=mask,
–> 717 convert_kwargs_to_constants=base_layer_utils.call_context().saving)
718
719 def compute_output_shape(self, input_shape):

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py in _run_internal_graph(self, inputs, training, mask, convert_kwargs_to_constants)
889
890 # Compute outputs.
tensortrade click here tensortrade
–> 891 output_tensors = layer(computed_tensors, **kwargs)
892
893 # Update tensor_dict.

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/base_layer.py in __call__(self, inputs, *args, **kwargs)
820 with base_layer_utils.autocast_context_manager(
821 self._compute_dtype):
–> 822 outputs = self.call(cast_inputs, *args, **kwargs)
823 self._handle_activity_regularization(inputs, outputs)
824 self._set_mask_metadata(inputs, outputs, input_masks)
tensortrade more info tensortrade

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/keras/layers/convolutional.py in call(self, inputs)
207 inputs = array_ops.pad(inputs, self._compute_causal_padding())
208
–> 209 outputs = self._convolution_op(inputs, self.kernel)
210
211 if self.use_bias:

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/ops/nn_ops.py in __call__(self, inp, filter)
1133 call_from_convolution=False)
tensortrade more info tensortrade
1134 else:
-> 1135 return self.conv_op(inp, filter)
1136 # copybara:strip_end
1137 # copybara:insert return self.conv_op(inp, filter)

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/ops/nn_ops.py in __call__(self, inp, filter)
638
639 def __call__(self, inp, filter): # pylint: disable=redefined-builtin
–> 640 return self.call(inp, filter)
641
tensortrade here tensortrade
642

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/ops/nn_ops.py in __call__(self, inp, filter)
237 padding=self.padding,
238 data_format=self.data_format,
–> 239 name=self.name)
240
241

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/ops/nn_ops.py in _conv1d(self, input, filter, strides, padding, data_format, name)
tensortrade check here tensortrade
226 padding=padding,
227 data_format=data_format,
–> 228 name=name)
229
230 # pylint: enable=redefined-builtin

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py in new_func(*args, **kwargs)
572 func.__module__, arg_name, arg_value, ‘in a future version’
573 if date is None else (‘after %s’ % date), instructions)
–> 574 return func(*args, **kwargs)
tensortrade here tensortrade
575
576 doc = _add_deprecated_arg_value_notice_to_docstring(

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py in new_func(*args, **kwargs)
572 func.__module__, arg_name, arg_value, ‘in a future version’
573 if date is None else (‘after %s’ % date), instructions)
–> 574 return func(*args, **kwargs)
575
576 doc = _add_deprecated_arg_value_notice_to_docstring(

tensortrade check here tensortrade
~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/ops/nn_ops.py in conv1d(value, filters, stride, padding, use_cudnn_on_gpu, data_format, name, input, dilations)
1680 data_format=data_format,
1681 dilations=dilations,
-> 1682 name=name)
1683 return array_ops.squeeze(result, [spatial_start_dim])
1684

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/ops/gen_nn_ops.py in conv2d(input, filter, strides, padding, use_cudnn_on_gpu, explicit_paddings, data_format, dilations, name)
931 input, filter, strides=strides, use_cudnn_on_gpu=use_cudnn_on_gpu,
932 padding=padding, explicit_paddings=explicit_paddings,
tensortrade get more info tensortrade
–> 933 data_format=data_format, dilations=dilations, name=name, ctx=_ctx)
934 except _core._SymbolicException:
935 pass # Add nodes to the TensorFlow graph.

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/ops/gen_nn_ops.py in conv2d_eager_fallback(input, filter, strides, padding, use_cudnn_on_gpu, explicit_paddings, data_format, dilations, name, ctx)
1020 explicit_paddings, “data_format”, data_format, “dilations”, dilations)
1021 _result = _execute.execute(b”Conv2D”, 1, inputs=_inputs_flat, attrs=_attrs,
-> 1022 ctx=ctx, name=name)
1023 if _execute.must_record_gradient():
1024 _execute.record_gradient(
tensortrade here tensortrade

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
65 else:
66 message = e.message
—> 67 six.raise_from(core._status_to_exception(e.code, message), None)
68 except TypeError as e:
69 keras_symbolic_tensors = [

~/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/six.py in raise_from(value, from_value)

tensortrade website tensortrade
UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [Op:Conv2D] name: sequential_1/conv1d_2/conv1d/
tensortrade

Tags: tensortrade, www bcfakes com

Leave a Comment