![]() |
submitted by /u/edthyme [visit reddit] [comments] |

![]() |
submitted by /u/edthyme [visit reddit] [comments] |
I am using tensorflow 2.4.1 with numpy 1.20.0, and I am trying to create a model using LSTM.
model = Sequential() model.add(LSTM(256, input_shape=(1, 66), return_sequences=True ))
Adding that LSTM layer gives me this error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 517, in _method_wrapper result = method(self, *args, **kwargs) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/engine/sequential.py", line 208, in add layer(x) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent.py", line 660, in __call__ return super(RNN, self).__call__(inputs, **kwargs) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 951, in __call__ return self._functional_construction_call(inputs, args, kwargs, File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1090, in _functional_construction_call outputs = self._keras_tensor_symbolic_call( File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call return self._infer_output_signature(inputs, args, kwargs, input_masks) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 863, in _infer_output_signature outputs = call_fn(inputs, *args, **kwargs) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent_v2.py", line 1157, in call inputs, initial_state, _ = self._process_inputs(inputs, initial_state, None) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent.py", line 859, in _process_inputs initial_state = self.get_initial_state(inputs) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent.py", line 642, in get_initial_state init_state = get_initial_state_fn( File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent.py", line 2506, in get_initial_state return list(_generate_zero_filled_state_for_cell( File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent.py", line 2987, in _generate_zero_filled_state_for_cell return _generate_zero_filled_state(batch_size, cell.state_size, dtype) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent.py", line 3003, in _generate_zero_filled_state return nest.map_structure(create_zeros, state_size) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/util/nest.py", line 659, in map_structure structure[0], [func(*x) for x in entries], File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/util/nest.py", line 659, in <listcomp> structure[0], [func(*x) for x in entries], File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/keras/layers/recurrent.py", line 3000, in create_zeros return array_ops.zeros(init_state_size, dtype=dtype) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper return target(*args, **kwargs) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 2819, in wrapped tensor = fun(*args, **kwargs) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 2868, in zeros output = _constant_if_small(zero, shape, dtype, name) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 2804, in _constant_if_small if np.prod(shape) < 1000: File "<__array_function__ internals>", line 5, in prod File "/home/sakuya/.local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 3030, in prod return _wrapreduction(a, np.multiply, 'prod', axis, dtype, out, File "/home/sakuya/.local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) File "/home/sakuya/.local/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 852, in __array__ raise NotImplementedError( NotImplementedError: Cannot convert a symbolic Tensor (lstm_19/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
I have no idea where I am going wrong here, but I can add the layer if I do not specify the input shape, but I need to do that.
submitted by /u/lastorder
[visit reddit] [comments]
In this technical blog post, learn how LinkedIn uses deep learning-based NLP technologies to better understand text semantics, which is key to any ranking model.
In this technical blog post, learn how LinkedIn uses deep learning-based NLP technologies to better understand text semantics, which is key to any ranking model.
Speech and natural language processing (NLP) have become the foundation for most of the AI development in the enterprise today, as textual data represents a significant portion of unstructured content. As consumer internet companies continue to improve the accuracy of conversational AI, search, and recommendation systems, there is an increasing need for processing rich text data efficiently and effectively.
However, one of the key challenges for achieving the desired accuracy lies in understanding complex semantics and underlying user intent, and effectively extracting relevant information from a variety of sources such as user queries and documents. In recent years, the rapid development of deep learning models has bolstered improvements for a variety of NLP tasks, indicating the vast potential for further improving the accuracy of search and recommender systems.
In this post, we introduce DeText, a state-of-the-art, open-source NLP framework developed at LinkedIn for text understanding, followed by a summary of the GPU-accelerated BERT assets available for you to jumpstart your NLP development.
I am trying to implement a simple bayes by backprop regression using the following tutorial
But my regressor is no where near learning. below is my model, can anyone suggest a simple implementation of the tutorial?
“`
def prior(kernel_size, bias_size, dtype=None):
n = kernel_size + bias_size
prior_model = tf.keras.Sequential([
tfp.layers.DistributionLambda(
lambda t:tfd.MultivariateNormalDiag(loc=tf.zeros(n), scale_diag=tf.ones(n))
)
])
return prior_model
def posterior(kernel_size, bias_size,dtype=None):
n = kernel_size + bias_size
posterior_model = tf.keras.Sequential([
tfp.layers.VariableLayer(tfp.layers.MultivariateNormalTriL.params_size(n),dtype=dtype),
tfp.layers.MultivariateNormalTriL(n)
])
return posterior_model
model = tf.keras.Sequential([
tfp.layers.DenseVariational(units=20,input_shape=(1,),make_prior_fn=prior, make_posterior_fn=posterior,kl_weight=1/x_train.shape[0]),
tf.keras.layers.ReLU(),
tfp.layers.DenseVariational(units=20,make_prior_fn=prior, make_posterior_fn=posterior,kl_weight=1/x_train.shape[0]),
tfp.layers.DenseVariational(units=1,make_prior_fn=prior, make_posterior_fn=posterior,kl_weight=1/x_train.shape[0])
])
model.compile(loss=tf.keras.losses.MeanSquaredError() , optimizer=tf.keras.optimizers.Adam(lr=0.001),metrics=[‘mae’])
print(model.summary())
history = model.fit(x_train, y_train, batch_size=batch_size, epochs=500,verbose=2)
“`
submitted by /u/_tfp_beginner
[visit reddit] [comments]
I passed the tensorflow in Nov 2020. I can’t find a way to show my profile on the network. Anyone could show me how to do it please? Thanks very much!
https://developers.google.com/certification/directory/tensorflow
submitted by /u/Winnie0123
[visit reddit] [comments]
![]() |
Hello everyone. I am an M.D. I am doing medical data analysis (not image at least now), I am using Matlab . I have seen TensorFlow, I wander is it worth for me to learn it? to make regression analysis KM plots etc. ? I tried to install to give a try. I wanted to use swift for tensor flow into Xcode. I couldn’t make it work. I installed the package. I can see that on toolchains. can someone give me an idea about Tensor Flow , if it is worth to use for me ? submitted by /u/onqun |
![]() |
AI colleagues, Indeed.com estimates average US salaries for Certified Deep Learning Engineer at $166k+. This Deep Learning with TensorFlow 2.0 Certification Training is curated with the help of experienced industry professionals as per the latest requirements & demands. This course will help you master popular algorithms like CNN, RCNN, RNN, LSTM, RBM using the latest TensorFlow 2.0 package in Python. You will be working on various real-time projects like Emotion and Gender Detection, Auto Image Captioning using CNN and LSTM. Skill-based training modules include: : 1) Getting Started with TensorFlow 2.0, 2) Convolution Neural Network, 3) Regional CNN, 4) Boltzmann Machine & Autoencoder, 5) Generative Adversarial Network(GANEmotion and Gender Detection, 7) Introduction RNN and GRU, 8) LSTM,and 9) Auto Image Captioning Using CNN LSTM. Enroll today (individuals & teams are welcome): https://fxo.co/AA8u Much career success, Lawrence E. Wilson – Artificial Intelligence Academy (tinyurl.com/52s6gqb9) Certified Deep Learning Engineer – Deep Learning with TensorFlow 2.0 Certification Training submitted by /u/lwilson747 |
This release includes support and performance improvements for the latest top ray tracing game tiles on DirectX and Vulkan. Also included is support for the stats command on Windows CLI.
NVIDIA Nsight Systems 2021.1 is now available for download!
Nsight Systems is a system-wide performance analysis tool, designed to help developers tune and scale software across CPUs and GPUs. Find out more at: https://developer.nvidia.com/nsight-systems
This release includes support and performance improvements for the latest top ray tracing game tiles on DirectX and Vulkan. Also included is support for the stats command on Windows CLI.
Nsight Systems is part of a larger family of Nsight tools. A developer can start with Nsight Systems to see the big picture and avoid picking less efficient optimizations based on assumptions and false-positive indicators.
Check out our new blog “Understanding the Visualization of Overhead and Latency in NVIDIA Nsight Systems”. If you are an nvprof or NVIDIA Visual Profiler user, be sure to read the blog posts [1], [2] & [3] to learn about migrating to their successors, Nsight Systems and Nsight Compute.
Subscribe to our YouTube channel for future release highlights and feature spotlights.
If you have questions, contact us at our forums and visit our product page to download the latest release of Nsight Systems.
AI is teaching cars to make better decisions, so could it do the same for surgeons? Addressing that question is the mission of Theator, a startup based in Palo Alto, Calif., with an R&D site in Tel Aviv, that’s striving to fuel the nascent revolution in autonomous surgery. Theator co-founder and Chief Technology Officer Dotan Read article >
The post Startup Couples AI with OR Video to Sharpen Surgeon Performance, Improve Patient Outcomes appeared first on The Official NVIDIA Blog.
I am thinking about the possibilities of measuring the water quantity of a container using any vision system.
I come across time of flight cameras which can work on short ranges and can give water level.
I would like to know about your thoughts on that.
submitted by /u/Ahmad401
[visit reddit] [comments]