0

I build a neural network model by using Keras in Python 2.7 and I applied CNN and ANN to this dataset.

I got running time of CPU and GPU and Of course, GPU is faster than CPU. but I want to get data transfer time from CPU to GPU and running time of each devices(CPU and GPU).

I searched on internet but I couldn't get satisfactory answer.

Here is my ANN code

model = Sequential()
model.add(Dense(72), input_dim=144, init='normal', activation='relu'))
model.add(Dense(16, init='normal', activation='sigmoid'))

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])

model.fit(X, dummy_y, batch_size=200, nb_epoch=10, verbose=3)

Please, help me out

Holden
  • 23
  • 5
  • 1
    perhaps by using one of the CUDA [profilers](http://docs.nvidia.com/cuda/profiler-users-guide/index.html#abstract). You will probably want to select profiling options to profile child processes; so look for those. – Robert Crovella Feb 16 '17 at 10:43
  • The linked duplicate explains how you can profile python code with the standard CUDA profiling tools – talonmies Feb 16 '17 at 11:45

0 Answers0