Categories
Misc

Is there a way to get insight into a model’s performance pre-inference?

Hi.

Given a TFLite model, is there a way to get information about it to know how it will perform? Such as, how can I know how long will it take the model to run on a given device (how does it consume CPU/GPU resources) before actual inferencing it?

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

Categories
Misc

Can i get a remote Machine learning job with only tensorflow certification (no bachelors degree)?

I finished 12 grade and want to study ML and found that I can get free course of tensorflow and tensorflow certification. I have a good standing in python and I dont want to do bachelor (money problem and the course here is outdated and not taught properly). So is there a remote job in ML, I can get with tensorflow certification only? I am willing to get other certification and learn other courses as long as they are online and free(or cost very less)

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

Categories
Misc

Could anyone tell me why one training model is so better than another one?

Hi all!

Been using TensorFlow for a short period of time and not really had much time to learn it. I managed to find code online to train TensorFlow models. But I managed to find two TensorFlow training code, but this one

Training code one: https://pastebin.com/0RKV0wBC

Seems to be a lot better than this one:

Training code two https://pastebin.com/VgVZG1bz

The only issue with the first one is that I can only use 2 sets of images, whereas in the other code I can use as many training sets as I like

I can use the same set of training data for both codes, and the first training code gives a far better, more accurate result than the second code.

Anyone knows why?

Thanks!

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

Categories
Misc

Combine GAN Generator output before feeding to Discriminator

I’m fairly new to the area of machine learning, but I figured I’d give this a try. Right now I’m trying to build a training pipeline for a CPPN that generates patterns. Since I want to be able to produce literally any resolution I’m outputting a single value per pixel. This works totally fine when using Model.predict(), since I can just aggregate the output based on my input Tensor configuration.

Now, for the GAN part, I need to somehow propagate the output from the Generator (which as mentioned is a dense layer with one unit, activated by a sigmoid function) to the Discriminator, which has an Input layer with the shape of the image provided, e.g. (width=100, height=100, channels=3).

Maybe what I’m trying to do is just not possible or the convention, but I’m stuck at the point where I need to properly align input and output, since when trying to build the GAN model right now it’s ranting about the shapes not being equal. Using Model.predict() doesn’t work either, since it’s not returning a Tensor and is being executed in batches.

Any tips for a fellow noob just starting out?

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

Categories
Misc

why is the mean of losses taken as opposed to the sum when calculating gradients?

Hi all,

I have been using the GradientTape method to loop through individual samples due to a very large batch size for a project I am working on.

I generated a much smaller batch to make sure my loop was producing the right total loss when compared to the GradientTape method applied directly to that batch..

I found that the method actually take the mean of the losses as opposed to the sum of losses before it is passed on the gradient method.

Why is the mean of losses used when calculating gradients instead of the sum of individual sample losses?

Thank you!

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

Categories
Misc

Complete noob here, what does it mean to compile manually?

Basically I’m trying to run this

https://github.com/andjoer/AI_color_grade_lut/blob/master/64pix2pix.ipynb

everthing works fine but it gives me this warning at the end :

WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. model.compile_metrics will be empty until you train or evaluate the model.

Then I run this:

https://github.com/andjoer/AI_color_grade_lut/blob/master/Pix2LUT.ipynb

Same thing everything works but at the end I get this:

WARNING:tensorflow:No training configuration found in the save file, so the model was not compiled. Compile it manually.

What can I do to get rid of this problem?

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

Categories
Misc

Program exited with exit code -1073740791 (0xC0000409)

I installed TensorFlow on my machine, and I planned to use it’s RTX 3070 for training the AI, when I try to run AI on the GPU, I reach the first epoch, but it does not start the training for some reason, and exits with code -1073740791, whenever I try to train the AI on the CPU everything works as intended.

I tried to research this exit code but have found no solutions, all help is appreciated.

Running using GPU: 

WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.saving.functional_saver has been moved to tensorflow.python.checkpoint.functional_saver. The old module will be deleted in version 2.11. WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.saving.checkpoint_options has been moved to tensorflow.python.checkpoint.checkpoint_options. The old module will be deleted in version 2.11. 2022-06-26 01:21:38.574693: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2022-06-26 01:21:40.878221: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 5472 MB memory: -> device: 0, name: NVIDIA GeForce RTX 3070, pci bus id: 0000:01:00.0, compute capability: 8.6 2022-06-26 01:22:54.239669: W tensorflow/core/framework/cpu_allocator_impl.cc:82] Allocation of 4414046208 exceeds 10% of free system memory. Epoch 1/10 2022-06-26 01:23:34.205541: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8401

Process finished with exit code -1073740791 (0xC0000409) 

Running using the CPU: WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.saving.functional_saver has been moved to tensorflow.python.checkpoint.functional_saver. The old module will be deleted in version 2.11. WARNING:tensorflow:Please fix your imports. Module tensorflow.python.training.saving.checkpoint_options has been moved to tensorflow.python.checkpoint.checkpoint_options. The old module will be deleted in version 2.11. 2022-06-26 01:28:48.257288: E tensorflow/stream_executor/cuda/cuda_driver.cc:265] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected 2022-06-26 01:28:48.278422: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-REDACTED 2022-06-26 01:28:48.278631: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-REDACTED 2022-06-26 01:28:48.287345: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. Epoch 1/10 8/702 [..............................] - ETA: 16:01 - loss: 2.9990 - accuracy: 0.5078 Process finished with exit code -1 

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

Categories
Misc

Possible to speed up matrix operations using TensorFlow?

I want to code up a linear regression using GPU capabilities.

I want to do this using matrix operations, not gradient descent.

Is there a way to use TensorFlow’s GPU capabilities to speed up matrix operations?

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

Categories
Misc

Model unable to train when adding more labels

This neural network seems to be working fine when NUM_CLASSES = 15, but when I try to add more labels it is unable to train the model and the accuracy stay stable at 0.05. Any ideas on what might be wrong?

model = tf.keras.models.Sequential([ tf.keras.layers.Dense(20, activation='relu'), tf.keras.layers.Dense(8, activation='relu'), tf.keras.layers.Dense(8, activation='relu'), tf.keras.layers.Dense(NUM_CLASSES, activation='softmax') ]) model.compile( optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'] ) 

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

Categories
Misc

Building Sequential LSTM

Building Sequential LSTM

Say I wanted to build an LSTM architecture like the below. My input is a matrix of size [n * 10] where n is the rows (each row represents an embedded vector) and 10 is the columns. My output should be a prediction of an embedded vector of size [1 *10], this data is available from a “future” date. Would the following code do what I am looking for?

model3.add(Embedding(10,10))

model3.add(LSTM(10,return_sequences=True,return_state=True,))

model3.add(Dense(1,activation=’sigmoid’))

Thanks in advance!

https://preview.redd.it/xeypkqt4rl791.png?width=1719&format=png&auto=webp&s=f52465d678216845dd2047f3dc27368889d2599d

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