-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about AutoEncoders #128
Comments
Hello @Dzandaa , Regarding "I suppose that in your example {EpochSize} (must be read {train size} ?)", you are correct. It's the number of samples in your training set. If you were using the CIFAR-10 dataset, it would be 50000. If you have 100 samples, it will be 100. I also have passion for autoenconders. In the case that your source code is open, feel free to publicize! In the case that I haven't replied to your question, feel free to ask for further clarification. Kind regards, |
Hi Joao, Thank you. We are testing CAI vs Python, for speed, memory consumption, ease of installation. Work in progress :) B-> |
Hi Joao What is the meaning of Idx? And // *************************** ImageId := Random(ImageVolumes.Count); // here I get a random Value from then whole Dataset pInput.Copy(pOutput); end; I don't use Valid and Test Volumes. for a dataset of 256 values and a batch of 64, Is it right? And in my case (getting values from the whole Dataset) what impact does it have on the network? B-> |
@Dzandaa , Most of times, I don't use In CAI, the batch is then subdivided into threads. CAI benefits from large batches as the threading overhead is smaller. |
@Dzandaa , Only if you love the above link, you can then look at: |
I tried this: Cores: Integer; NeuralFit.MaxThreadNum := Cores; And add in Project->Options->Custom Options: -dHASTHREADS Also, what is the range of NeuralFit.CurrentTrainingError? I try to use NeuralFit.TrainingAccuracy, but it is always Zero, I suppose I miss something. B-> |
@Dzandaa, Regarding the maximum number of cores (threads) to be used, I usually select the number of real cores not including the logic HT cores. This is the best scenario in most of my own experiments. It may be good to include the logic cores only on specific cases when the batch size is very large and the CPUs are paired with a GPU that is far from full capacity. Otherwise, I would stick with the real core count. Example: a processor with 64 cores and 256 hyper threads. I would select 64 instead of 256. |
Regarding the training accuracy, the problem is to define an "accurate prediction" for each sample. You can have a look at this example: https://github.com/joaopauloschuler/neural-api/tree/master/examples/HypotenuseFitLoading In the above example, you can find:
In this example, an accurate prediction is a prediction with up to 0.1 in absolute error. |
Regarding the error, this is how it's calculated:
There is no upper limit to it. |
Thank you very much for the explanations. for speed and memory comparison, I try to adapt this Autoencoder to PyTorch.
But not being a specialist in Python and Pytorch, I can't find the corresponding layers in Pytorch I have this: Encoder
Decoder
????? Any help? Sorry to bother you!!! B-> |
I'll try to find time to do it. |
Hi, We assume that this is due to the CUDA drivers. On the other hand: |
Many thanks for sharing! At the time that you are benchmarking the speed, is this the training speed or the actual running? In the case that you can share your PyTorch code, I would love to be able to repeat the benchmark at my end. |
Hi, |
Hi Joao
In a denoising auto-encoder
I have:
NeuralFit.FitLoading(NNAutoencoder, {EpochSize=}SETrainSize.Value, 0, 0, {Batch=}SEBatch.Value, {Epochs=}SEEpoch.Value, @GetTrainingData, nil, nil);
I suppose that in your example {EpochSize} (must be read {train size} ?)
If Randomly get one image from the whole set of training images
and set SETrainSize value to 100
Mean that the NN takes 100 images for each Epoch?
`
procedure TDenoizingForm.GetTrainingData(Idx: integer; ThreadId: integer;
pInput, pOutput: TNNetVolume);
var
ImageId : integer;
begin
ImageId := Random(ImageVolumes.Count);
pOutput.Copy(ImageVolumes[ImageId]);
pInput.Copy(pOutput);
pInput.AddGaussianNoise(FSNoise.Value);
end;
`
Thank you.
B->
The text was updated successfully, but these errors were encountered: