print('The \"{}\" set of dataset \"{}\" contains the responses of {} RGC neurons to {} images'.format(tier,dataset_name,responses.shape[1],responses.shape[0]))
```
%% Cell type:code id: tags:
``` python
# show some example images and the neural responses
n_images=5
max_response=responses[:n_images].max()
foriinrange(n_images):
fig,axs=plt.subplots(1,2,figsize=(15,4))
axs[0].imshow(images[i])
axs[1].plot(responses[i])
axs[1].set_xlabel('neurons')
axs[1].set_ylabel('responses')
axs[1].set_ylim([0,max_response])
plt.show()
```
%% Cell type:markdown id: tags:
# Build the model, transfer core, train and evaluate performance - 4 instances
#Change trainer config to not track and print the training progress
trainer_config={'track_training':False,
'verbose':None,
'detach_core':True}
#Save information on training
#with open("D://inception_loop/RGC_sim_data/models/Train_log_.txt", "a") as log_file:
# comment = 'Comment: Results for tunned fullgaussian model with V1 core and readout trained with ephy data with only 2 good neurons with spatial rf. Shifter network used. Cropped images around rf location with padding.'
# date = "Date: " + datetime.now().strftime("%m/%d/%Y, %H:%M:%S")
# Generate MEIs for target neurons from selected models
targets_list=range(2)
fortargetintargets_list:
#Generate MEI for one target unit
MEIS.generate(target,track=True)
```
%%%% Output: stream
Working on neuron_id=0
Working with images with mu=111.30036163330078, sigma=60.936492919921875
getting image size:
starting drawing
%%%% Output: stream
D:\inception_loop\ines_code\MEI.py:76: UserWarning: The function torch.rfft is deprecated and will be removed in a future PyTorch release. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.fft or torch.fft.rfft. (Triggered internally at ..\aten\src\ATen\native\SpectralOps.cpp:590.)
pp = torch.rfft(grad.data, 2, onesided=False)
D:\inception_loop\ines_code\MEI.py:77: UserWarning: The function torch.irfft is deprecated and will be removed in a future PyTorch release. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.ifft or torch.fft.irfft. (Triggered internally at ..\aten\src\ATen\native\SpectralOps.cpp:602.)