The phase transformations of stoichiometric HfO2 and non-stoichiometric HfOx oxides grown by ion-beam sputtering-deposition during their electron beam crystallization were investigated. It was found that the sequences of crystalline phase formations in stoichiometric and non-stoichiometric oxides are significantly different. An amorphous HfO2 film crystallizes first to form monoclinic alpha-HfO2 phase nanocrystals and then tetragonal beta-HfO2 phase nanocrystals. In non-stoichiometric HfOx oxides (x=1.82), in contrast to HfO2 oxides, hexagonal alpha-Hf phase metal clusters were initially present. During the crystallization process, the metallic alpha-Hf phase growth was observed first with the simultaneous appearance of the monoclinic alpha-HfO2 phase. Then the orthorhombic-I gamma-HfO2 phase appeared, while the alpha-Hf phase growth ceased. The composition of the investigated non-stoichiometric HfOx oxides was chosen to be the same as in the dielectric layer of resistive memory cells (ReRAM). The crystallization of oxides was carried out in a local region, the sizes of which are comparable with the size of the ReRAM filament. This made it possible to partially project the crystallization results onto the forming and switching processes in ReRAM cells.