Categories
Misc

Tensorflow Error: ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 225, 225, 1), found shape=(None, 255, 255, 1)

im stupid ignore me

Didn’t see that the imgDimentions on the trainer was set to 225,225,1 but the detector was trying to find 255,255,1 images

its been a long day!

Hi all, me again haha

Ive run into an error that has stumped me for about an hour;

Im trying to train a TensorFlow modal to detect a British one pence coin and a British 2 pence coin, while the model trained, when it detects the objects it crashes and gives me this error:

ValueError: Input 0 of layer “sequential” is incompatible with the layer: expected shape=(None, 225, 225, 1), found shape=(None, 255, 255, 1)

its finding the shape its supposed to find, but it says its not? Any advice would be greatly appreciated!

Thanks all!

submitted by /u/Adhesive_Hooks
[visit reddit] [comments]

Categories
Misc

Best Course to learn TensorFlow?

Hey everyone,

I recently started doing some smaller TF projects and decided that it’s a good time to get some more formal training in the area and with TF.

I found a few interesting resources and was wondering if any of you have completed them and what your thought are? Are there any great resources I am missing on this list?

For background, I am most interested in time series analysis, medical AI, and TF on embedded devices like the Google Coral but think a combination of a broad course + one specialized on these areas would be best.

What are your thoughts?

submitted by /u/SamualAdam
[visit reddit] [comments]

Categories
Misc

Pycharm for Tensoflow Developer Certification

I’m starting to prepare for the certification and from what I know jupyter notebooks are only editable in pycharm professional edition. The exercises in the course im taking (DeepLearning.AI TensorFlow Developer Professional Certificate) are in ipynb format.

So I’m a little confused if the test will be done in .ipynb or .py format? If it is in .ipynb, will I need to get pycharm professional? Thanks in advance!

submitted by /u/jonathanneam
[visit reddit] [comments]

Categories
Misc

CUDA 11.6 Toolkit New Release Revealed

New CUDA 11.6 Toolkit is focused on enhancing the programming model and performance of your CUDA applications.

NVIDIA announces the newest release of the CUDA development environment, CUDA 11.6. This release is focused on enhancing the programming model and performance of your CUDA applications. CUDA continues to push the boundaries of GPU acceleration and lay the foundation for new applications in HPC, visualization, AI, ML and DL, and data science.

CUDA 11.6 has several important features. This post offers an overview of the key capabilities:

  • GSP driver architecture now default on Turing and Ampere GPUs
  • New API to allow disabling nodes in instantiated graph
  • Full support of 128-bit integer type
  • Cooperative groups namespace update
  • CUDA compiler update
  • Nsight Compute 2022.1 release

CUDA 11.6 ships with the R510 driver, an update branch. CUDA 11.6 Toolkit is available to download.

GSP driver architecture

The GSP driver architecture is now the default driver mode for all listed Turing and Ampere GPUs. The older driver architecture is supported as a fallback. For more information, see R510 Driver Readme.

Instantiated Graph Node API additions

We added a new API, cudaGraphNodeSetEnabled, to allow disabling nodes in an instantiated graph. Support is limited to kernel nodes in this release.  A corresponding API, cudaGraphNodeGetEnabled, allows querying the enabled state of a node. We’ve also added the ability to disable NULL kernel graph node launches.

128-bit integer support

CUDA 11.6 includes the full release of 128-bit integer (__int128) data type, including compiler and developer tools support. The host-side compiler must support the __int128 type to use this feature.

Cooperative groups namespace

The cooperative groups namespace has been updated with new functions to improve consistency in naming, function scope, and unit dimension and size.

Implicit Group/Member Threads Blocks
thread_block:: dim_threads
num_threads
thread_rank
thread_index
(Not needed)
grid_group:: num_threads
thread_rank
dim_blocks
num_blocks
block_rank
block_index
Table 1. New functions in cooperative groups namespace

CUDA compiler

  • Added -arch=native compilation option to target installed GPUs during compilation. This extends the existing -gencode=arch=compute_xx,code=sm_xx architecture specification
  • Add the ability to create PTX files from nvlink

Deprecated features

  • The cudaDeviceSynchronize() used for on-device fork and join parallelism is deprecated in preparation for a replacement programming model with higher performance. These functions continue to work in this release, but the tools emit a warning about the upcoming change.
  • CentOS Linux 8 has reached End-of-Life on Dec 31, 2021, and support for this OS is now deprecated in the CUDA Toolkit. CentOS Linux 8 support will be completely removed in a future release. 

Additional resources

Categories
Misc

Hi, I need some help with a custom loss function that I’m trying to build for a class project

I’m trying to make a GAN model to reconstruct one image from another. So I have two MRI images I put one example of these images, which my input is the top one and the target is the bottom one. My problem here is that I’m trying to create a custom loss function that would penalize pixels that are from the background that are not inside of the brain. A professor told me about masking the image inside of the loss function so I’m kinda lost :/. Can anyone help me ?

Edit: My image didn’t upload so I’m attaching the link https://www.researchgate.net/publication/273638459/figure/fig4/AS:272623535915014@1442009924273/Brain-MRI-and-DTI-at-2years-of-age-A-Axial-T1-weighted-images-reveal-microcephaly-with.png

submitted by /u/DaSpaceman245
[visit reddit] [comments]

Categories
Misc

Tensorflow_probability CNN gives the same output regardless of the input

submitted by /u/RaunchyAppleSauce
[visit reddit] [comments]

Categories
Misc

Is it possible for someone to give me some advice on why my model just does not work?

Hi all, Im trying to train a TensorFlow model to differentiate between a British one pence coin and a two pence coin.

I have 50 Photos for each at the dimension size 255 X 255, all photos are in focus and taken in natural sunlight.

Here is the training code I am using

https://pastebin.com/khjZrSgs

And here is the testing code I am using:

https://pastebin.com/1RZc35xK

I am pretty new to this and only following YouTube Tutorials, any advice would be fantastic!

Thanks all!

submitted by /u/Adhesive_Hooks
[visit reddit] [comments]

Categories
Misc

I want to extract patches from multiple images of a batch

Consider my input data.shape = [batch_size, 10_images, img_size, img_size, 1]

I want to extract patches of patch_size of each 10 images in a particular batch.

After that combine patches of all these 10 images as a whole in sequential order.

So that my output is like, output.shape = [batch_size, 10_images * patch_size * patch_size * 1]

Please help.

submitted by /u/ashwani_iitp
[visit reddit] [comments]

Categories
Misc

Obtain operators list

I am currently working on a tensorflow 1 project which I would like to migrate to tensorlfow 2, the project builds a tf model and then extracts the operations used in the model with the following code

graph = tf.get_default_graph()

operations = graph.get_operations()

I can’t find a way to do the same using tensorflow2, does anyone know how to do so? thanks!

submitted by /u/ostrichfear
[visit reddit] [comments]

Categories
Misc

How to have better results at forecasting?

I am a beginner in machine learning and I would like to forecast some pollution data.

I am using a dataset with values for pm2.5, pm10 and pm1 as features and I am predicting the values for the pm2.5. I built an LSTM network but the predicted values are quite from the real values.

What I used:

win_length=2 batch_size=32 num_features=3 train_generator=TimeseriesGenerator(x_train,y_train,length=win_length,sampling_rate=1,batch_size=batch_size) test_generator=TimeseriesGenerator(x_test,y_test,length=win_length,sampling_rate=1,batch_size=batch_size) 

`

The used model is LSTM:

model=tf.keras.Sequential() model.add(tf.keras.layers.LSTM(200,input_shape=(win_length,num_features),return_sequences=True)) model.add(tf.keras.layers.LeakyReLU(alpha=0.5)) model.add(tf.keras.layers.LSTM(128,return_sequences=True)) model.add(tf.keras.layers.LeakyReLU(alpha=0.5)) model.add(tf.keras.layers.Dropout(0.3)) model.add(tf.keras.layers.LSTM(64,return_sequences=False)) model.add(tf.keras.layers.Dropout(0.3)) model.add(tf.keras.layers.Dense(1)) 

This is the data snippet and how the predicted values look compared to the original pm2.5 values: prediction snippet

How to increase the accuracy of the forecast? I am also attaching the jupyter notebook, which contains all the analysis: https://github.com/creativitylab/dataset/blob/main/pollution%20data.ipynb

submitted by /u/MobileInformal460
[visit reddit] [comments]